Jul 17 2019 07:45 PM
I have been receiving excel 97-2003 output as follows from a third party application. The data looks like below.
Detail | |||||||||
Port | Bench | ||||||||
Avg % Wgt | Tot Rtn | CTR | Avg % Wgt | Tot Rtn | CTR | Tot Attr | |||
PVAST | 100.000000 | 3.496272 | 3.496272 | 100.000000 | 3.647863 | 3.647863 | -0.146255 | ||
Cash | 5.865017 | 0.000000 | 0.000000 | 0.000000 | -0.204005 | ||||
AUD | 5.800607 | 0.000000 | 0.000000 | 0.000000 |
when parsed as comma separated sequence of string gives me the following output
"Detail,,,,,,,,"
",,,Port,,,Bench,,"
",,,Avg % Wgt,Tot Rtn,CTR,Avg % Wgt,Tot Rtn,CTR"
"PVAST,,,100,3.496272,3.496272,100,3.647863,3.647863"
",Cash,,5.865017,0,0,0,,"
",,AUD,5.800607,0,0,,,"
now when I open the above file in excel and save it with a different file name, firstly the size of the file increases by 20 KB and now when parsed gives me following output
"Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
",,,Port,,,Bench,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
",,,Avg % Wgt,Tot Rtn,CTR,Avg % Wgt,Tot Rtn,CTR,Tot Attr,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
"PVAST,,,100,3.496272,3.496272,100,3.647863,3.647863,-0.146255,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
",Cash,,5.865017,0,0,0,,,-0.204005,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
I am expecting the second output. But not sure why this difference in behavior when the file content is same. I checked it with Excel Compare tool also.