ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing design in excel from VB.NET (https://www.excelbanter.com/excel-programming/301580-changing-design-excel-vbulletin-net.html)

Tomek[_6_]

changing design in excel from VB.NET
 
Hi,
Please help me with this. I'm exporting data to excel file and I want to
customize its apperance (i.e. bold columns name, auto size colums width,
freeze some columns). Is it possible?
Thanks in advance,
Tomek



Trevor Mills

changing design in excel from VB.NET
 
I find that recording a macro with the proposed formatting changes is a good way to start. This identifies all the issues that you need to consider.

You will need to "tidy up" the code considerably. Be careful when using functions like Ctrl End because Excel may insert a defined range in the code. You will find ActiveCell.SpecialCells(xlTypeLastCell).Row useful to identify the last row on a spreadsheet page.

I assume that .Net will be similar to VBA Automation in that you will need to instantiate an Excel object in .Net and the use the methods and properties that you inherit to "manipulate" the formatting i.e. implementing the code that you have created in the first step above.

Hope this helps

Trevor

"Tomek" wrote:

Hi,
Please help me with this. I'm exporting data to excel file and I want to
customize its apperance (i.e. bold columns name, auto size colums width,
freeze some columns). Is it possible?
Thanks in advance,
Tomek





All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com