Using (OleDbDataAdapter dataAdapter = new OleDbDataAdapter("SELECT * FROM ", con))Ĭonsole.WriteLine(()) Using (OleDbConnection con = new OleDbConnection(string.Format(connectionStringFormat, pathToFile))) String connectionStringFormat = "Provider=.12.0 Data Source= Extended Properties=\"Excel 12.0 HDR=No IMEX=1\"" Using (var pck = new ExcelPackage(newFile)) String pathToFile = "C:\\Users\\Peter\\Documents\\test.xlsx" įileInfo newFile = new FileInfo(pathToFile) I've created a console app to minimise the amount of code required to demonstrate the issue, here is the code: Save() method the spreadsheet is saved but then I get a 'External table is not in the expected format.' exception when trying to fill a DataAdapter. xlsx spreadsheet using EPPlus (4.0.4) and saving the file, immediately afterwards I am loading parts of the data into datatables.Īfter I call the. Please add this to one of the next realeases. _drawingNames.Add(Name, _drawings.Count - 1) XmlElement drawNode = CreateDrawingXml() ĭrawNode.InnerXml = ĮxcelShape shape = new ExcelShape(this, drawNode) Throw new Exception("Name already exists in the drawings collection") Throw new InvalidOperationException("Chart worksheets can't have more than one drawing") If (Worksheet is ExcelChartsheet & _drawings.Count > 0) Public ExcelShape AddShape(string Name, ExcelShape Source) I just found a solution to clone shapes from one file to another. Drawings on the worksheet.ĮxcelPackage xlspackage = new ExcelPackage(new FileInfo("test.xlsx")) Just open it in your program try to access. RelPic = () Īttached I have an file where you can test this. However the function ExcelPicture(ExcelDrawings drawings, XmlNode node) in ExcelPicture.cs tries to execute An embedded picture looks like this in drawing.xml: There is an issue loading Excel files which contain external pictures. 16:02:57,971 1484749 ERROR System.NotSupportedException: This property or method is not supported for a Chartsheet Package.SaveAs(new I miss anything? Thanks in advance!Ĭomments: Same problem, can't save xlsx with pivot table and chart. Var countsSheet = ("Counts-Data") ĭ(dt, true) Ĭ(ct, true) ĭ(durationSheet.Cells, durationSheet.Cells) Ĭ(countsSheet.Cells, durationSheet.Cells) > at ()įollowing is the code I used for testing: > Message=This property or method is not supported for a Chartsheet > InnerException: System.NotSupportedException > at (ExecutionContext executionContext, ContextCallback callback, Object state) > at (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) > at (String assemblyFile, Evidence assemblySecurity, String args) > at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args) > at (String args) in c:\Development\LoadTestReportingToolkit\LoadTestReportingToolkit.Analyzer\Program.cs:line 64 > System.InvalidOperationException was unhandled When I try to save my workbook, I get following exeption:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |