4
Answers

.xlsx file format conversion

Swayam Rath

Swayam Rath

7y
183
1
Hello Everyone,
 
We generate an excel report from a tool in a defined format(file is attached INPUT.xlsx).
However we would like to convert that to another format(file is attached OUTPUT.xlsx).
Could i get some help in developing the logic to parse input.xlsx and produce output.xlsx?
 
thanks in advance.
 
Regards,
Swayam 

Attachment: Excel.zip

Answers (4)
1
Amit Gupta

Amit Gupta

NA 16.5k 25.7k 7y
For reading/writing of excel files, you can either use Interop.Excel or OLEDb. OleDb only used for read/write (no formatting). If you want any formatting like borders and stuffs then you have to go for Interop.Excel.
0
alice yang

alice yang

NA 747 86 7y
You can also use free spire.xls library to open, read, edit and convert xlsx files, it's easy to use and doesn't need Excel to be installed. Here is the guidance for your reference:
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Spire.XLS-Program-Guide-Content.html 
0
Amit Gupta

Amit Gupta

NA 16.5k 25.7k 7y
Yeah, I saw both the files and I'm? afaraid that you have to go for a little long path to solve this. I think this can be better achieved through reading either line by line or cell by cell and after you get all the inputs, you can proceed with your expected output format.
0
Swayam Rath

Swayam Rath

NA 9 191 7y
Thanks Amit.
 
I was looking for some sort of help in formulating the logic to convert the input.xlsx into output.xlsx. 
Did you get a chance to have a look at those two files?
 
Regards
swayam