J
jgrob3
I'm importing a fixed width text file into another workbook using
workbooks.opentext and would like to store all the setup info for this
process in a table within an Excel sheet so the user can change the
setup when they need to.
At the moment, I have columns for Field Headings (text), Field Format
(being the text for xlColumnDataTypes), and start position (integer).
When I read the data in however, the FieldInfo is expecting an integer
Excel constant (eg xlTextFormat or 2), rather than the text of this
(eg "xlTextFormat").
Is there a way to convert from a string representation of an Excel
constant to the constant's actual value?
I thought of using Evaluate (but that's only for cell/range
references) or CInt (doesn't work either). I'm kludging it at the
moment by doing a vlookup and getting the appropriate integer value
that way but surely there's a more elegant solution?
Any ideas?
tia
Jeff
workbooks.opentext and would like to store all the setup info for this
process in a table within an Excel sheet so the user can change the
setup when they need to.
At the moment, I have columns for Field Headings (text), Field Format
(being the text for xlColumnDataTypes), and start position (integer).
When I read the data in however, the FieldInfo is expecting an integer
Excel constant (eg xlTextFormat or 2), rather than the text of this
(eg "xlTextFormat").
Is there a way to convert from a string representation of an Excel
constant to the constant's actual value?
I thought of using Evaluate (but that's only for cell/range
references) or CInt (doesn't work either). I'm kludging it at the
moment by doing a vlookup and getting the appropriate integer value
that way but surely there's a more elegant solution?
Any ideas?
tia
Jeff