Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export a table to a QVD

Export a table to a QVD

Hi Forum

I have a simple table. I have to export the rows to a QVD. What sentence Can i Use ?
I have used this sentece.

set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\test.qvd", 4

but it doesn´t work.

Can i include the correct sentence in the script ?


Thanks for your answers !!

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Found the error. For simple table objects (TableBox) the function is Export (instead of ExportEx):

obj.Export File, 4


- Ralf

Astrato.io Head of R&D

View solution in original post

9 Replies
Miguel_Angel_Baeyens

Take a look at this. Do the files exist? Are you overwriting? Do you have any issues with permissions on the path?

I'm using the same code as you and the button exports properly when clicked, and QVD file is readable and contents are real.

rbecher
MVP
MVP

I'm facing the same problem. It works with table diagrams but not with tables!

- Ralf

Astrato.io Head of R&D
rbecher
MVP
MVP

I'm using this macro code which works fine with table diagrams:

sub ExportAuswertung
set obj = ActiveDocument.GetSheetObject("CH120")
File = activedocument.Evaluate("'TIQView' & timestamp(now(), 'YYYYMMDDhhmm') & '.qvd'")
obj.ExportEx File, 4
end sub


- Ralf

Astrato.io Head of R&D
rbecher
MVP
MVP

..

Astrato.io Head of R&D
rbecher
MVP
MVP

Found the error. For simple table objects (TableBox) the function is Export (instead of ExportEx):

obj.Export File, 4


- Ralf

Astrato.io Head of R&D
Not applicable
Author

Thanks for your answers

When I use the code with a button. It works OK. But If i use the code in the script. it doesn´t work.

Sub ServerExport
set st = ActiveDocument.GetSheetObject("TB01")
File = activedocument.Evaluate("'C:\QlikView Archivos Requerimientos\Germinador\prueba.qvd'")
st.Export File, 4
End Sub

Sub ServerExport

What can i do ?

Thanks

Not applicable
Author

Hi forum.

Finally I use a macro. Document properties-> Macros -> OnPostReload (MyMacro)

Sub ServerExport
set st = ActiveDocument.GetSheetObject("TB01")
File = activedocument.Evaluate("'C:\QlikView \text.qvd'")
st.Export File, 4
End Sub

Thank for your ideas !!!

Not applicable
Author

Hi, All

To store data into the qvd, you don't have to use the macro/vb script to do any export.

Please use the 'edit script' function and put following code:

"store {yourTableName} into {yourfilename}.qvd;"

Best Regards

Mingming

Hi, Sorry that didn't understand the question clearly. Please ignore my answer...

jagannalla
Partner - Specialist III
Partner - Specialist III

Miguel,

I tried to open your This  Link. I'm not able to see any content there.

Hi All,

Can anyone help on this Thread .

In your discussion correct answer says that the code work for  with table diagrams but not with tables. Then how can i overcome with tablebox.

- And one more thing is when i generate qvd through macro code. When i load this  qvd into editscript the filetype it shows delimited. My question is y it is not showing qvd filetype even if i select qvd filetype the data is empty.