7 Replies Latest reply: Oct 30, 2012 10:35 AM by Rebecca Molstad RSS

    export to excel

    sriram s

      Hello,

       

       

         My requirement is that I have a combo chart.I have created a button for export to excel feature. I have written a macro for export to excel for chart. But when I export only the values from the combo chart is getting exported to excel Then chart is not getting exported to excel.

       

      Please help me how to export the full chart with values when I click the button?

       

      Thanks

      Sriram

        • Re: export to excel
          Gysbert Wassenaar

          If you want to export the chart image then you need to use the CopyBitmapToClipboard function

           

          ActiveDocument.GetSheetObject("CH01").CopyBitmapToClipboard

          objExcel.Selection.Paste

           

          Or perhaps qvexcel is what you need.

            • Re: export to excel
              sriram s

              I am getting Object required 'objExcel'

               

              How to resolve the above error?

               

              My macro is given below

               

              sub ExportBitmapExcel2
              Set XLApp = CreateObject("Excel.Application")
              XLApp.Visible = TRUE
              Set XLDoc = XLApp.Workbooks.Add
              j = ""
              j = "Sheet1"


              ActiveDocument.GetSheetObject("CH02").CopyTableToClipboard true
              objExcel.Selection.Paste
              XLDoc.Sheets(j).Range("A" & 17).Select
              XLDoc.Sheets(j).Paste
              end sub

               

               

               

               

              Can you please tell me how to resolve the above error when exporting chart to excel?

                • Re: export to excel
                  Gysbert Wassenaar

                  sub ExportBitmapExcel2

                   

                  Set XLApp = CreateObject("Excel.Application")
                  XLApp.Visible = TRUE
                  Set XLDoc = XLApp.Workbooks.Add

                  j = "Sheet1"

                   

                  ActiveDocument.GetSheetObject("CH02").CopyBitmapToClipboard

                  XLDoc.Sheets(j).Range("A" & 17).Select
                  XLDoc.Sheets(j).Paste

                   

                  ActiveDocument.GetSheetObject("CH02").CopyTableToClipboard true

                  XLDoc.Sheets(j).Range("A" & 37).Select
                  XLDoc.Sheets(j).Paste

                   

                  end sub