Example





In This Topic
GdPicture14 Namespace / GdPictureDocumentConverter Class / SplitExcelSheetsIntoPages Property

SplitExcelSheetsIntoPages Property (GdPictureDocumentConverter)

In This Topic
Specifies that xls and xlsx sheets should be split into pages according to the PageSetup element of each sheet.
Syntax
'Declaration

 

Public Property SplitExcelSheetsIntoPages As Boolean
public bool SplitExcelSheetsIntoPages {get; set;}
public read-write property SplitExcelSheetsIntoPages: Boolean; 
public function get,set SplitExcelSheetsIntoPages : boolean
public: __property bool get_SplitExcelSheetsIntoPages();

public: __property void set_SplitExcelSheetsIntoPages( 

   bool value

);
public:

property bool SplitExcelSheetsIntoPages {

   bool get();

   void set (    bool value);

}

Property Value

The default value is false.
Example
Loading and converting a .docx document showing the revisions.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()

    gdpictureDocumentConverter.SplitExcelSheetsIntoPages = True

    Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("test_xlsx.xlsxx", GdPicture14.DocumentFormat.DocumentFormatXLSX)

    If status = GdPictureStatus.OK Then

        MessageBox.Show("The file has been loaded successfully.", "GdPicture")

        status = gdpictureDocumentConverter.SaveAsPDF("Converted.pdf", PdfConformance.PDF)

        If status = GdPictureStatus.OK Then

            MessageBox.Show("The file has been saved successfully.", "GdPicture")

        Else

            MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture")

        End If

    Else

        MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture")

    End If

End Using
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())

{

    gdpictureDocumentConverter.SplitExcelSheetsIntoPages = true;

    GdPictureStatus status = gdpictureDocumentConverter.LoadFromFile("test_xlsx.xlsx", GdPicture14.DocumentFormat.DocumentFormatXLSX);

    if (status == GdPictureStatus.OK)

    {

        MessageBox.Show("The file has been loaded successfully.", "GdPicture");

        status = gdpictureDocumentConverter.SaveAsPDF("Converted.pdf", PdfConformance.PDF);

        if (status == GdPictureStatus.OK)

        {

            MessageBox.Show("The file has been saved successfully.", "GdPicture");

        }

        else

        {

            MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture");

        }

    }

    else

    {

        MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture");

    }

}
See Also