Auto-Size a Excel cell

Auto-Size a Excel cell

  

Hello,

I am using the resources of the Excel package(the ones from the module that is available on the Forge) and I can export the data to a new excel file but I can't resize the cells.

Does anyone have a answer for this? 

Hi Paulo,

The extension's "Cell_Write" actions have variations that end with "WithFormat". These specific actions accept an input parameter of the "CellFormat" type. This is a structure that has an attribute named "AutofitColumn", that allows you to specify that the column should automatically expand to fit its contents. Is that what you are looking for?

Aurelio Santos wrote:

Hi Paulo,

The extension's "Cell_Write" actions have variations that end with "WithFormat". These specific actions accept an input parameter of the "CellFormat" type. This is a structure that has an attribute named "AutofitColumn", that allows you to specify that the column should automatically expand to fit its contents. Is that what you are looking for?

I already used the CellFormat variable and it didn't work


Could you go into a bit more detail as to why "it didn't work"?

Here's an Excel file I've just created using the extension. The first column was created using "Cell_WriteByIndexWithFormat", and the second using "Cell_WriteByIndex". Is this not what you're trying to achieve?

Aurelio Santos wrote:

Could you go into a bit more detail as to why "it didn't work"?

Here's an Excel file I've just created using the extension. The first column was created using "Cell_WriteByIndexWithFormat", and the second using "Cell_WriteByIndex". Is this not what you're trying to achieve?

WAIT! the first cell! The auto fit helped for registering values whithout getting out of the border of the cell?

cause i used a assign with the auto fit and it didn't work, like this: 

SyntaxEditor Code Snippet

CellFormat.AutofitColumn = True



Hello,

Still with the same problem but i gaved up using the advance package excell resources and go back to the RecordListToExcell resources and i was wondering: Is there any why to control the weight of the cell with what i am using now ?

Thanks in Advance