OpenXML- Copy Formula is not working after generating excel file - c#

I have created one application using openXML features to export excel file. Initially I tried to fill excel cell by cell but, I faced performance issue because of bulk data. Then I copied datatable content into Excel table.
Now I am able to generate bulk data.
But after generating excel file I am not able apply copy formula.

Related

Database to Excel SSIS Dynamic creation

Explanation: I have an excel file that will be placed into a folder every day. There is normally about 5-7 worksheets inside that excel file. Each worksheet has the same column schema. I have an ssis package that extracts the data into a table and runs a procedure to several more columns of derived data to the original in the table. After the data has been added to the table i need to export it out into the excel file (Which will be the final complete report).
The ssis package has to For-Each Loops. One to loop through the excel files. and one inside that to loop through the sheets in the file. My initial idea was that i could just load straight from the database table back into the original excel file and overwrite all the data existing in there. Only problem is there is more columns in the table than can be mapped to the excel spreadsheet (because it originally only contains the 7 before the procedure is run). I have looked into dynamic excel creation but this seems over complicated for something that should be able to just be overwritten.
The process will work one sheet at a time, extract the data, build the extra data in the table, export the entire table back to the excel file. Rinse and repeat for the next several sheets in the excel file.
What would be the best approach for Reloading the data from the table back into the excel spreadsheet WITH the new columns also. Is dynamic excel sheet creation best for this? Or is there a better way to remap new columns to the existing spreadsheet and just add in the new data?
Thanks for the help in advance.

Excel Sheet Insert/Update Performance Comparison in C#

Currently I am working on Excel sheet module of XXX project.
I need to optimize performance of Excel record insert and update because they have millions of record with very complex condition and many cell applying different formula.
So my problem is that which one is faster insert record with create new excel sheet or in edit mode insert record on already created xyz excel template.
Right now I am using NPOI plugin for creating excel file.

Excel created with EPPlus having no data but large size

I am using EPPlus open source tool for creating / editing excel files on server.
When I insert data to excel created by EPPlus by opening it using C# .net code some time size of files gets increase upto 8-10Mb.
If I copy all content in MS Excel from that file and save it then it is of only 20 kb.
What should be the actual cause behind increasing excel file size created by EPPlus
It was due to unreadable content generated in excel it self. When I used new release of EPPlus (4.1.0) I have not get any problem like this.

How to copy selected columns from excel file to other excel file using c#

I want to copy a selected column from one excel file and paste that column to other excel file using c#
Use this free library. It's very simple to open and create xslx files! (not "free" but LGPL)

How to generate Excel chart from Excel template?

I have data in 10 columns in Excel sheet
I created an Excel template with 2 columns (salary, average) and a graph generated by those 2 columns
I need to take that Excel template as input and the out put should be
An Excel sheet with 2 columns of DATA and a CHART or GRAPH generated by that data.
You may create a template excel sheet and save it as as xml (save as => choose excel 2003 xml format). Now you just have to replace your template values with placeholders which can easily be replaced using string replacements.
We just created an excel import/export this way. Be careful though, excel does not read all xml files, even if they are valid xml. When writing relay on string operations instead of linq to xml or xml writers and stick exactly to the format excel creates when saving.

Categories

Resources