473,396 Members | 2,147 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,396 software developers and data experts.

Problem with Excel Header/Footer from .NET ???

The following code :

Public Class c
Shared Sub main()
Dim obj As Object
Dim wbk As Object
Dim wks As Object
obj = CreateObject("Excel.Application")
'bj.Visible = True
wbk = obj.WorkBooks.Add
wks = wbk.WorkSheets("Feuil1")
obj.visible = True
wks.Cells(1, 1).Value = "A"
wks.PageSetup.CenterFooter = "Page &N"
MsgBox(wks.PageSetup.CenterFooter)
obj = Nothing
End Sub
End Class

The &N code should display the page number. Instead it shows the workbook
file name ? The same code works in Excel VBA. Looks like some kind of
interaction with Excel/.NET.

Is this a known problem ? I'm using a French version of Excel in case it
matters...

TIA for any advice...
Jan 3 '06 #1
0 1010

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

Similar topics

4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
4
by: John hoffman | last post by:
Hello, I am trying to set the MS Excel header and footer font using automation from C#. I can set the text using: oPageSetup.LeftHeader = "Header Text"; but how do you set the Font...
2
by: creed1 | last post by:
I am currently working with an Active Server Page (ASP) that is set to redirect its output to Excel using Response.ContentType = "application/vnd.ms-excel". It works great, but I need to find a...
6
by: Elena | last post by:
I'm trying to export data to an Excel worksheet. I can export the data in the cell values perfectly. I need the code to change a header and footer for the worksheet, not for the columns. Is...
5
by: Elena | last post by:
I need the VB.NET code to change the header/footer of an Excel spread sheet, ASAP. I am doing it through a VB application. I can change the ranges/cell values using code, but I do not know how to...
3
by: Blasting Cap | last post by:
I have an app that gives a user an option to pull an online report into Excel. I have the rows formatted in a couple different colors, with a grey header & footer. No matter what colors the...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
0
by: Raymond Chiu | last post by:
Dear all, Can the excel page header or page footer have the variables which will be assigned by vb.net program at run time?? How to set variables in page header or page footer? How to reference...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.