YD

Hello Community,

I want to create an excel table with the createExcelWorkbook() function.

I would like to set the cell width with the function setColumnWidth(). For the small cell width, it works perfectly. However, for other large scale cell width, no matter what number I gave to the function, all the cell width was set to be 49.31. I have to change the cell width manually in excel.

Is there a maximal cell width limit while using the function setColumnWidth()?

BR

 

by Kay Fischbach
Posted on Wed, 06/19/2019 - 16:14

Hi there.

I tested it with the patched version of ARIS 10.0.7 and the method works as expected, without a 49.31 column size limit.

 

My tiny test script (report context doesn't matter; output to xlsx):

var workbook = Context.createExcelWorkbook(Context.getSelectedFile());

var sheet = workbook.createSheet("Sheet1");

sheet.setColumnWidth(0, 60*256);

workbook.write()

This gives me a workbook, with one sheet where the first column is 59.29 wide.

Granted, when I swap the 60 with 256, ARIS reminds me that the max width of a column is 255 characters. But even with 255 I get a column width of 254.29 - far wider that your 49.31.

Could you test whether or not my tiny test script gives you different results, provide a code sample of your code with the important parts for us to see, and/or maybe tell us more about your environment (ARIS version in use,...).

 

0
by Ye Ding Author
Posted on Fri, 06/21/2019 - 16:42

Hi Kay,

thank you very much for your reply.

I tried your code and it gives me a wider cell as expected. 

It's a predifined value in the code which leads to this problem and I didn't notice that before.

Thank you again!

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock