Save Excel more than 65536 Rows

Posted by: taehyongi on 8 September 2017, 1:56 pm EST

  • Posted 8 September 2017, 1:56 pm EST

    Hi. I am a Korean. So My English ....zzz 


    I have a problem.


     Grid have 70000 Rows.


     I used "SaveExcel" Method.


     But Last Row Number is 65536


     So I searched this Forums about same issue


    I found "FarPoint.Excel.ExcelSaveFlags"


    <IMG width=395 height=129>


    I cannot find "UseOOXMLFormat" flag


     How can I solve this problem

  • Replied 8 September 2017, 1:56 pm EST

    Hello,


    Make sure you save the file as .xlsx,using <FONT size=2>UseOOXMLFormat while exporting to excel.Below is the code snippet  that exports a large file to excel with 70000 Rows.</FONT>

    <FONT size=2><FONT size=2>

    FpSpread1.Sheets(0).RowCount = 70000


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> f </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>String

    </FONT></FONT><FONT size=2>

    f = </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"D:\mptest.xlsx"

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> s </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> System.IO.FileStream(f, IO.FileMode.Create, IO.FileAccess.ReadWrite)


    FpSpread1.SaveExcel(s, FarPoint.Excel.ExcelSaveFlags.UseOOXMLFormat)


     

    </FONT>

    I Hope it will help you.


    Regards, 

    </FONT>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels