Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have Pivot table Data ,how to Export Excel using Button.
Thankls
I have written a function and would share with you.
Function Send2Excel(objID, xlSheet, r)
Set tableToExport = ActiveDocument.GetSheetObject(objID)
Set chartProperties = tableToExport.GetProperties
tableToExport.SendToExcel
colCount = tableToExport.GetColumnCount
rowCount = tableToExport.GetRowCount
Set xlApp = GetObject(, "Excel.Application")
xlApp.Visible = True
xlApp.DisplayAlerts = False
Set xlDoc = xlApp.ActiveWorkbook
Set xlSht = xlDoc.Sheets(1)
For i = 1 to rowCount
For j = 1 to colCount
xlSheet.Cells(i, j) = xlSht.Cells(i, j)
Next
Next
xlDoc.Close
End Function
Hi Devarasu,
I tried the macro in your attachment its working fine for 1 table but I need to export 3 charts data at a time . can you please help me for exporting these charts.
Regards,
Anusha