Last active
April 15, 2021 14:32
-
-
Save GroupDocsGists/c119873f115a451030df2d9c9196f619 to your computer and use it in GitHub Desktop.
Convert PDF or Word file to Excel in C#
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
// Convert PDF document to Excel Spreadsheet in C# | |
using (Converter converter = new Converter("document.pdf")) | |
{ | |
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions(); | |
converter.Convert("outputpath/convertedSpreadsheet.xlsx", options); | |
} |
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
// Convert second page of PDF file to Excel in C# with some options | |
using (Converter converter = new Converter("document.pdf")) | |
{ | |
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions | |
{ | |
PageNumber = 2, | |
PagesCount = 1, | |
Format = SpreadsheetFileType.Xlsx, | |
Zoom = 150 | |
}; | |
converter.Convert("outputpath/convertedSpreadsheet.xlsx", options); | |
} |
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
// Convert Word document to Excel Spreadsheet in C# | |
using (Converter converter = new Converter("document.docx")) | |
{ | |
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions(); | |
converter.Convert("outputpath/convertedSpreadsheet.xlsx", options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment