SaveAsXLSX(String) Method
This method converts the currently loaded document to XLSX and saves it to an instantiated stream object.
'Declaration
Public Overloads Function SaveAsXLSX( _
ByVal As String _
) As GdPictureStatus
Parameters
- FilePath
- The file path where the converted file will be saved. If the specified file already exists, it will be overwritten.
Return Value
A member of the
GdPictureStatus enumeration. If processing is successful, then the return value is
GdPictureStatus.OK.
Converting and saving a PDF document to a XLSX file.
using GdPicture14;
using GdPictureDocumentConverter converter = new();
var status = converter.LoadFromFile("input.pdf");
if (status != GdPictureStatus.OK)
{
throw new Exception(status.ToString());
}
status = converter.SaveAsXLSX("output.xlsx");
if (status != GdPictureStatus.OK)
{
throw new Exception(status.ToString());
}
Console.WriteLine("The input document has been converted to a xlsx file");