Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following macro, which outputs a csv file:
SUB csv_Macro
SET sObject = ActiveDocument.GetSheetObject("CH01")
sObject.Export "C:\Users\....\TestFile.csv", ", "
END SUB
I was hoping to add additional logic so that I could rename the first two blank columns in row 1.
For example, if I am outputting a file with five columns, then I want cell D1 to be labeled as "LineItem" and cell E1 to be labeled as "Amount"
Similarly, if the file I am outputting has three columns, then I want cell B1 to be labeled as "LineItem" and cell C1 to be labeled as "Amount"
I am new to coding Macros in QlikView, and while I have gotten the export to work, I would appreciate any help with adding the additional logic above.
Hi,
You dont need to do anything.
When you export the chart it will be exported with labels given.
Regards,
Kaushik Solanki
In the charts that I am exporting, while the number of columns in each chart may be different, the last two columns in every chart do not have headers. I am hoping to build the logic noted above in the QlikView macro, as opposed to maintaining a separate macro in Microsoft Excel.
Hi,
That is what i want to say, why you want to use a macro when you can give a labels in Qlik Chart, So if you manage them properly in chart you dont need a macro to re do the same thing.
Regards,
Kaushik Solanki
As you can see in the attached image, I have a number of expressions in a single column, and so while I can label each expression individually (assets, liabilities, etc) in the chart "Properties", I need a header for all of my equations.