Is there any way to code in a test case the ability to align and format data using ExcelKeywords in a spreadsheet? Like align the output data Left/Center/Right, and numerical data with the number of digits to the right of a decimal point?
I haven’t tried to format the data in Excel (because I don’t care what it looks like) but you can try to send these commands in front of your text. Remember to send these as “keys” and not as text:
Shortcut keys for alignment in Excel
To change alignment in Excel without lifting your fingers off the keyboard, you can use the following handy shortcuts:
- Top alignment - Alt + H then A + T
- Middle alignment - Alt + H then A + M
- Bottom alignment - Alt + H then A + B
- Left alignment - Alt + H then A + L
- Center alignment - Alt + H then A + C
- Right alignment - Alt + H then A + R
On which device do you want to align and format data?
On a window of Microsoft Excel app?
On the “Data Files” displayed in Katalon Studio’s GUI?
On the web page of your target Web app displayed on browser?
You need to be explicit and specific on which device you want to achieve what you described above. — I don’t see it.
This makes your question totally puzzling.
As far as I see, the ExcelKeyword implements no method to set/change the style of Cells…
However, you can set the style of Cells using Apache POI API directly (without the ExcelKeyword). See the following article for example:
To answer your question, I was looking to format data in the Excel spreadsheet as I write the data to it. This was requested by the users that analyse the performance output data from the test case analysts.
Thanks for your reply.
that lazy user can simply click on any column header and one more click to the desired align button.
if i will be in your shoes, i will provide to that user the data as csv, not as xsl. just so he will need to move his ass a bit more