The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'd like to ask how do you open and write to an existing excel file because I keep getting an error regards to the filename. I read this article (https://help.syncfusion.com/file-formats/xlsio/loading-and-saving-workbook?cs-save-lang=1&cs-lang=csharp) but I get an error.
//Creates a new instance for ExcelEngine. ExcelEngine excelEngine = new ExcelEngine(); //Loads or open an existing workbook through Open method of IWorkbooks IWorkbook workbook = excelEngine.Excel.Workbooks.Open(@"filename.xlsx");
The error says "Argument 1: cannot convert from 'string' to 'System.IO.Stream'". I know I should use a dependency but I'm not sure how to do it. And from here (https://www.syncfusion.com/forums/120967/how-do-you-display-the-excel-sheet-on-your-phone), I copied this part:
But I get this error: An exception of type 'System.ArgumentNullException' occurred in Syncfusion.XlsIO.Portable.dll but was not handled in user code Additional information: Value cannot be null.
Note: We suspect issue might be occurred as if the file is not located in the provided location or else file shouldn’t have embedded in the resource.
If you still able to reproduce the issue, then kindly modify and share the issue reproducing sample which will be helpful for us to provide prompt solution at the earliest.
Regards,
Abirami.
CcMarch 29, 2017 06:35 PM UTC
Hi, I tried your solution. Is there a way to write to an existing excel file without getting prompted to save every time the button is pressed?
MMMathu Mohan Vijayakumar Syncfusion Team March 30, 2017 04:00 PM UTC
Hi Cathleen,
Thank you for updating us.
We have prepared the sample to write an existing Excel file without prompting and the sample can be downloaded from the following link.
Kindly refer and let us know if your requirement is fulfilled.
Regards,
Abirami.
CcApril 3, 2017 02:05 PM UTC
Thanks! It works for me now. Currently, the written excel file saves to ...\Appdata\Local\Packages\... , is there a way to make it go to Desktop automatically?
MMMathu Mohan Vijayakumar Syncfusion Team April 4, 2017 11:06 AM UTC
Hi Cathleen,
In UWP applications, the following folders can be accessed outside of the app storage
Folders declared in manifest file (eg: KnownFolders)
Folders added in the FutureAccessList or MostRecentlyUsedList
Folders picked using FolderPicker Class.
We have prepared the sample using FolderPicker and FutureAccessList classes. Once the folder is selected , it will write the file without prompting.