Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Jagan ,
as per discuss plz look into this marco ,its not exporting table value in excel
FUNCTION ExcelExport("TB01") set obj = ActiveDocument.GetSheetObject( "TB01") w = obj.GetColumnCount
if obj.GetRowCount>1001 then h=1000 else h=obj.GetRowCount end if Set objExcel = CreateObject("Excel.Application") objExcel.Workbooks.Add objExcel.Worksheets(1).select()
objExcel.Visible = True set CellMatrix = obj.GetCells2(0,0,w,h) column = 1
for cc=0 to w-1 objExcel.Cells(1,column).Value = CellMatrix(0)(cc).Text objExcel.Cells(1,column).EntireRow.Font.Bold = True
column = column +1 next c = 1 r =2 for RowIter=1 to h-1 for ColIter=0
to w-1 objExcel.Cells(r,c).Value = CellMatrix(RowIter)(ColIter).Text c = c +1 next r = r+1 c = 1
next END FUNCTION SUB CallExample ExcelExport( "TB01" ) END SUB
Hi,
Try the same code with Aligned...and give the Macro Name in the Actions Tab.. Here ExcelExport
FUNCTION ExcelExport()
set obj = ActiveDocument.GetSheetObject( "TB01")
w = obj.GetColumnCount
if obj.GetRowCount>1001 then
h=1000
else h=obj.GetRowCount
end if
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Add
objExcel.Worksheets(1).select()
objExcel.Visible = True
set CellMatrix = obj.GetCells2(0,0,w,h)
column = 1
for cc=0 to w-1
objExcel.Cells(1,column).Value = CellMatrix(0)(cc).Text
objExcel.Cells(1,column).EntireRow.Font.Bold = True
column = column +1
next
c = 1
r =2
for RowIter=1 to h-1
for ColIter=0 to w-1
objExcel.Cells(r,c).Value = CellMatrix(RowIter)(ColIter).Text
c = c +1
next
r = r+1
c = 1
next
END FUNCTION
Don't forget to do the Below Settings in Macro Module
Requested Module Security -> System Access
Current Local Security -> Allow System Access
Find the attached for your reference
Dear Settu,
this part i already i done but main issue is in send this table throw email with schedule timing.plz hlep if you can .
Hi Check these threads.