-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide support for ExcelLite implementation for .xls documents (#882)
* Provide support for ExcelLite implementation for .xls documents (Excel Office 97 to 2003). * Remove unneeded package reference to GemBox.Spreadsheet. (cherry picked from commit f531a26)
- Loading branch information
1 parent
0cde42c
commit ca82946
Showing
5 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.IO; | ||
using GeneXus.Office; | ||
using GeneXus.Utils; | ||
using UnitTesting; | ||
using Xunit; | ||
|
||
namespace DotNetCoreUnitTest.Excel | ||
{ | ||
public class ExcelLiteTest : FileSystemTest | ||
{ | ||
[Fact] | ||
public void ExcelLiteReadTest() | ||
{ | ||
ExcelDocumentI excelDocument= new ExcelDocumentI(); | ||
string fileName = Path.Combine(BaseDir, "SampleXLS.xls"); | ||
excelDocument.Open(fileName); | ||
Assert.Equal(0, excelDocument.ErrCode); | ||
double number = excelDocument.get_Cells(2, 1).Number; | ||
Assert.Equal(1, number); | ||
string text = excelDocument.get_Cells(2, 2).Text; | ||
Assert.Equal("A", text); | ||
|
||
number = excelDocument.get_Cells(3, 1).Number; | ||
Assert.Equal(2, number); | ||
text = excelDocument.get_Cells(3, 2).Text; | ||
Assert.Equal("A", text); | ||
|
||
number = excelDocument.get_Cells(101, 1).Number; | ||
Assert.Equal(100, number); | ||
text = excelDocument.get_Cells(101, 2).Text; | ||
Assert.Equal("A", text); | ||
|
||
excelDocument.Close(); | ||
} | ||
} | ||
} |
Binary file not shown.