Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert the entire column in Excel to text format #158

Closed
Hari3288 opened this issue Feb 20, 2016 · 1 comment
Closed

How to convert the entire column in Excel to text format #158

Hari3288 opened this issue Feb 20, 2016 · 1 comment
Assignees
Labels

Comments

@Hari3288
Copy link

Hi,

Could you please let me know how to convert the entire column in Excel file to text format. I am using the below code but it is formatting only that particular cell value. I want to format the entire column to text.

$worksheet->Keep_leading_zeros();
$my format1 = $workbook->add_format(num_format => '@');
$worksheet->write_string($ir,$ic,$value,$format1);

$ir - row index
$ic - column index

Thanks in advance.

@jmcnamara jmcnamara self-assigned this Feb 21, 2016
@jmcnamara
Copy link
Owner

You can set the format for a column using set_column().

Note that, as in Excel, a column format is overridden by a row format which is in turn overridden by a column format (this is explained in the above docs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants