c# - Excel interop writes excel files that contain "empty" cells -
i have c# tool creates excel worksheets, later read in again tool. done using excel interop.
when reading generated excel file, exception stating: oledbexception: many fields defined.
it means file cannot read in because there amny columns, there should not be, real content takes 90 columns. workaround deleted other columns manually in excel, , tried again read in. works expected, means generated excel contain nonempty cells (which shown empty cells in excel...)
is there way tell inerop not create empty cells, or there reason should check?
many tom
ps: experiencing problem 2003 interop libraries, while i've got office 2007 installed.
i've found solution: tool copying ranges 1 sheet another.
the source range defined: getrange(fromworkbookname, fromsheetname, a1, v20);
the destination cell hoever adressed by: getrange(toworkbookname, tosheetname, a1).entirerow;
in 2003 interop, seemed no problem. when doing towards xslx file office 2010, "empty" fields containing "#n/a" created.
nasty nasty...
anyhow tool not doing copy/paste correctly (even excel warns when copy range manually entire line). after correcting seems work....
Comments
Post a Comment