I'm trying out the Spire.XLS to merge some OpenXml Excel files.
My problem is that when create a Workbook and load the files from disk, there are rows missing.
The source Excel files has first row with values, then three empty rows, and then six additional rows with values. This is represented in OpenXml as:
- Code: Select all
<x:row r="1" spans="1:64">
<x:row r="5" spans="1:64">
<x:row r="6" spans="1:64">
<x:row r="7" spans="1:64">
<x:row r="8" spans="1:64">
<x:row r="9" spans="1:64">
<x:row r="10" spans="1:64">
This would be row 1 to 10 in the excel file.
However, after loading it into a Workbook object I only get rows 1 to 6 corresponding to rows 1 to 6 in the excel file, including the empty rows ie missing rows 7, 8, 9 and 10. The same issue exists with all the files I'm working with(provided to me from a 3rd party).
Loading the files like this:
- Code: Select all
Workbook wb = new Workbook();
wb.LoadFromFile(@"C:\temp\960b6192-dc68-4c84-b204-4e28c8acefcc.xlsx", true);
And accessing the sheet rows like this for example:
- Code: Select all
var rows = wb.Worksheets[6].Rows;
What could be the problem? Any suggestions?
// Hakan