PDA

View Full Version : how could i set the format of an Excel column?



sesamfox
10th April 2016, 09:00
i have a xls file generated from another application. I should modify the xls file when reading it in my QT application, for example, change the type of some columns from number to text.

could i use QAxObject.setProperty() or dynamicCall()?

and how to set text type in QT?

d_stranz
11th April 2016, 18:10
could i use QAxObject.setProperty() or dynamicCall()?

Probably, if you can use Excel's ActiveX interfaces to identify the workbook, sheet, and column you want to modify.


and how to set text type in QT?

Using Excel's ActiveX API and whatever parameters that API tells you to use to change the text format. This isn't a Qt issue, it is an Excel issue.