473,408 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Using excel PrintTitleRows not being saved

I'm using VB.net writing out to an Excel file. every thing works fine BUT
the following code does not saved the "PrintTitleRows " or
"PrintTitleColumns " information
to the file when the worksheet is display. I can set the fields when the
sheet is displayed in excel but I can't set the data in VB. Any Help??

Thank John
With excelWorksheet.PageSetup

..PrintTitleRows = "$1:$4"

..PrintTitleColumns = "$A:$Q"

End With

excelWorksheet.PageSetup.PrintArea = ""

With excelWorksheet.PageSetup

..LeftHeader = ""

..CenterHeader = ""

..RightHeader = ""

..LeftFooter = ""

..CenterFooter = ""

..RightFooter = ""

..LeftMargin = excelWorksheet.Application.InchesToPoints(0.003472 22222222222)

..RightMargin =
excelWorksheet.Application.InchesToPoints(0.003472 22222222222)

..TopMargin = excelWorksheet.Application.InchesToPoints(0.003472 22222222222)

..BottomMargin =
excelWorksheet.Application.InchesToPoints(0.006944 44444444444)

..HeaderMargin = excelWorksheet.Application.InchesToPoints(0.5)

..FooterMargin = excelWorksheet.Application.InchesToPoints(0.5)

..PrintHeadings = False

..PrintGridlines = False

..PrintComments = Excel.XlPrintLocation.xlPrintNoComments

..PrintQuality = 600

..CenterHorizontally = False

..CenterVertically = False

..Orientation = Excel.XlPageOrientation.xlLandscape

..Draft = False

..PaperSize = Excel.XlPaperSize.xlPaperLetter

'.FirstPageNumber = xlAutomatic

..Order = Excel.XlOrder.xlDownThenOver

..BlackAndWhite = False

..Zoom = 100

..PrintErrors = Excel.XlPrintErrors.xlPrintErrorsDisplayed

End With
Nov 21 '05 #1
0 1285

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jae | last post by:
I'm writing a web application that exports and imports excel files. The application gets a list of users and their info and displays it in a datagrid .The user then selects to save the file as a...
0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
7
by: Alain \Mbuna\ | last post by:
Hi everybody. In my program I have some data that is calculated after some input from the user. I have written some code that opens an Excel workbook, with 5 worksheets and the calculated data...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
4
by: somanyusernamesaretakenal | last post by:
What I am trying to achieve: Basically I have generated a report in access. This report needs to be updated using excel. (Updating the new data, not changing existing data) What I did was I...
3
by: S_K | last post by:
Hi, I have a problem when I try to save a .CSV file from an ASP.NET web page and the client has Excel open already. The symptoms are: 1) The web page is currently displaying the Excel...
0
by: Kaztuba1 | last post by:
I have a macro that formats a sheet for me but it seems to run extremely slow. I just wanted to make sure that there isn't a fast method or that i wasn't doing anything wrong to make it slow. Here...
1
by: raul15791 | last post by:
Hi, I'm new to C#. I'm writing a program that open a new excel file, write into it and lastly close the file. But the program is that there will be a orphaned process named EXCEL.EXE left on the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.