Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a bar chart, when i export this chart i get data in below format in xls
And desired format is :
Please find the attached test report for more details.
Thanks.
Exporting the pivot table you also have is not an option? That way it works fine.
No .. Bar chart needs to export in that way..
Create a button that says "Export Bar Chart" but instead export the pivot. Who will know?
Otherwise you will have to create a macro to do so, something like :
SUB Excel
set obj = ActiveDocument.GetSheetObject( "CH01" )
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 8
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 8
objExcel.Cells(r,c).Value = CellMatrix(RowIter)(ColIter).Text
'msgbox(CellMatrix(RowIter)(ColIter).Text)
c = c +1
next
r = r+1
c = 1
next
END SUB
But I really do not see why.....
Good trick .. but they dont want to have any button..
Hi Pallavi,
Are you using any macro to export this?
or you are just sending it send to excel option.
If its 2nd option then from Fast Change,change the Bar chart to Pivot Graph. and then do send to excel, which was already in your QV document. I know its not a proper way, but you will get the desired output.
Hi,
I am using send to excel option. changing Bar chart to pivot and export it option is not available to me .
My requirement is to export Bar chart to mentioned xls format using send to excel option.
Pallavi,
see this
Can you use the quick change property to allow the user to change the object from a Bar to a Pivot table. Then they can format it as desired and export to excel.
This is standard functionality and therefore requires no coding.
HI Pallavi,
It was available in your QV Application.
First click on fast change (Right hand from the send to excel option at chart) and then do Send to excel and you are doing. It will provide you the desired output.