You can use the Style.Custom property to specify the desired format and set the style object to as many columns as you like. For instance, please check the following piece of code that applies the currency format to 2 columns (B & C).
Please note, as you have not specified the platform of interest so I have posted the C# code. Let me know if you need Java code instead.
C#
Workbook book = new Workbook(fileName); Style style = book.CreateStyle(); style.Custom = “[$kr.-406] #,##0.00”; Worksheet sheet = book.Worksheets[0]; sheet.Cells.Columns[1].ApplyStyle(style, new StyleFlag(){NumberFormat = true}); sheet.Cells.Columns[2].ApplyStyle(style, new StyleFlag(){NumberFormat = true});
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.