Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Excel in Ole Container - cell formatting
Versions des environnements
I am using a Ole container control to automate an Excel spreadsheet to display data from my database and allow the user to use Excel to further manipulate the data.
At design time, I right click on the control and select Worksheet object...Edit, and then insert column titles in the first row, and format the columns of the Excel object so that the titles display properly. When I remove the focus from the Ole container control, I can see the grid, and the columns are properly formatted, in particular the width is correct. (I am using Arial, 9 point, normal font.)
However, when I run my form, the formatting of the columns in the Ole container control before I activate Excel is not correct. In particular, the column titles have spread out and no longer fit within their column widths. The character spacing within the column titles has increased in some places. It is almost as if I have gone from a proportional font to one with a fixed spacing.
When I activate Excel, the formatting is correct. When the control loses the focus, the formatting goes back to having character spacing that is too large in some places.
I would appreciate any guidance on this.
Thanks,
Jim
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement