Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Im creating a table in macro and and I have to replace all the "," for ";" in all column and rows using macro. How can I do that?
Hi!
Please, check the attached file. I re-wrote your code because you were using a Table Box object, not a Straight Table object (the table box does not allow calculated dimensions). Plus, I added some code to rename dimension labels and allow zero values.
Let me know your doubts!
Regards,
Jaime.
Hi!
What kind of table are you creating (straight table, pivot table, table object, table in data model)?
You may use the vbs function Replace if you can run over each cell of the table.
Regards!
Jaime.
Its a straight table, I have to replace all values in all cells of the table.
aaa;aaa
bbb ; bbb
aaa;;aaaa
a;a;a;a;a;;
should looks like:
aaa,aaa
bbb , bbb
aaa;;aaa
a,a,a,a,a,,
Hi!
If it is a straight table then there will be dimension and expression columns.
Regards,
Jaime.
Im trying but not working, could you show me with the example added??
Hi!
Please, check the attached file. I re-wrote your code because you were using a Table Box object, not a Straight Table object (the table box does not allow calculated dimensions). Plus, I added some code to rename dimension labels and allow zero values.
Let me know your doubts!
Regards,
Jaime.
Thank you very much. It worked perfectly.
Is it possible to use it Table Object? I will have to do it eventually.
Tried with tb.AddField "=Replace(columnA,';',',')"
but didnt work.
Nope, you can't (as far as I know). A table object only display data as it is, you can not build a calculated dimension nor expression (you have to use a straight or pivot table for that).
There is a workaround, though. If you add in your load script something like Replace(columnA,';',',') as columnA_Modified then you can use the field colmnA_Modified in your table object.
Regards,
Jaime.
Thank you.