Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Macro to export to Excel converts my text to numbers! Need Text!

Send to Excel I get this which is what I want:

852111581301575510575246314

Using Macro I get this:

8.52111581301575E+26

how do I get the macro to force it to text?

1 Reply
chematos
Specialist II
Specialist II

If you have that number in a TextObject you could use this:

Set z = ActiveDocument.GetSheetObject("TXyourtextID")

  z.CopyTextToClipboard

  wrksht.Range("A1").Select

  wrksht.paste

Or you could set a variable with your value and the use this at the macro to get the value as String:

varValue = ActiveDocument.Variables("yourVariableWithTheValue").GetContent.String

There are a few ways to do it, just try or search "convert to string vbs" in google

Hope this helps, regards