Export to EXCEL 2007 with Header Issue

Posted by: blackbenzo on 8 September 2017, 2:28 pm EST

  • Posted 8 September 2017, 2:28 pm EST

    Hello,


    Anyone know how to export spread sheet to excel with header?


    I couldn't figure it out.. pls help me.


     


    If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                Try


                    strFileName = SaveFileDialog1.FileName


                    Dim ret As Boolean
                 
                    'Save


                    '  ret = fpSpread.SaveExcel(strFileName, FarPoint.Excel.ExcelSaveFlags.SaveBothCustomRowAndColumnHeaders)
                    Dim f As String


                    f = strFileName


                    Dim s As New System.IO.FileStream(f, IO.FileMode.Create, IO.FileAccess.ReadWrite)
                    fpSpread.ActiveSheet.Protect = False
                    ret = fpSpread.SaveExcel(s, FarPoint.Excel.ExcelSaveFlags.UseOOXMLFormat)
                    s.Close()
                    If (ret = False) Then


                        MsgBox("PROBLEM: Could not save file - ")
                    End If


                    MsgBox("Completed")


                Catch ex As Exception
                    Throw ex
                End Try
            Else
                Exit Sub
            End If

  • Replied 8 September 2017, 2:28 pm EST

    Have you tried FarPoint.Excel.ExcelSaveFlags.SaveAsViewed ? If that doesn't work can you send me a copy of your spread sheet with your headers that I can try it out with?

Need extra support?

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

Learn More

Forum Channels