Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ExcelSheet.Format Styles for Text
Anyone know what the style code for text/string is?

The help shows:
Quote:x - variable with formats:
  style - style name (string).
    In Excel there are several predefined styles ("Currency", "Percent"...). User can define more styles.
    Use "Normal" to reset all existing formatting.
  numberFormat - number format (string).
    To see number format strings for predefined formats: In Excel "Format Cells" dialog select a format and then select "Custom".

The "Normal" is "general", but which one sets the style to Text so that editing UPCs and stuff won't switch to scientific?"Text" errors with invalid number of parameters. Date and Time also don't seem to work.. So all of the ones not listed in the help file. hah.

Anyone know what the style code is for these styles?

Sorry, I just realized this isn't QM code.. it's an imported library.

Apparently @ is text.

Text - "@"
Integer - "0"
Decimal - "0.00"
Percent - "0%"
Date - "M/D/YY"
Time - "h:mmConfuseds"
Datetime - "M/D/YY h:mm"

But as opposed to the library's help, you would use 
instead of"@""Normal" sets the style to General

Thanks to everyone who looked at this. I hope this helps someone in the future.

Forum Jump:

Users browsing this thread: 1 Guest(s)