ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2015-02-15 15:24:54

MyOnAsSalat
Member
Registered: 2015-02-15
Posts: 1

Save table in *.xls or *.xlsx

Hello, i'm from russia.(sorry, my english very bad) 
I need save table in exel format, but i not found this in russian documentation.

This code save in *.rgf

        Dim dlgExport As New SaveFileDialog
        With dlgExport
            .Title = "Сохраняем в формате rgf"
            .DefaultExt = "rgf"
            .Filter = "Книга Reogrid (rgf)|*.rgf"
            .FileName = Application.StartupPath
            .ShowDialog()
            rgrid.CurrentWorksheet.Save(.FileName)
        End With

Offline

#2 2015-02-16 03:49:12

asparatu
Member
Registered: 2014-08-20
Posts: 196

Re: Save table in *.xls or *.xlsx

MyOnAsSalat,
    You can only save the entire workbook and not worksheets using the xlxs file format. To do that you need to use this code


This will save the file.

        Dim dlgExport As New SaveFileDialog
        With dlgExport
            .CheckFileExists = True
            .CheckPathExists = True
            .Title = "Save"
            .DefaultExt = "xlsx"
            .Filter = "Excel Workbook|*.xlsx"
            .FileName = Application.StartupPath
        End With

       If dlgExport.ShowDialog = true then
        workbook.Save(.FileName, IO.FileFormat.Excel2007)
       End If

Check this Documentation http://reogrid.net/v0-8-8/excel-file-format/

Offline

#3 2015-02-26 00:46:30

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Save table in *.xls or *.xlsx

Thanks asparatu, nice answer!

Offline

Board footer

Powered by FluxBB