Setting Custom Paper size in Excel from Java Script

Ramkumar

New Member
Joined
Sep 29, 2005
Messages
2
I'm using Excel as a reporting service from my asp.net application.
First HTML page is generated and is exported to Excel using javascript, then alignment etc...are done via javascript.

My problem is while setting user definced paper size ..

Paper size is Height : 6 inches, Width : 10 inches

I try using oExcelSheet.PageSetup.PaperSize = xlPaperLetter for Letter size..
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to the Board.

Is that paper size in the list in Ecel when you set it manually? If you record a macro while setting it what code do you get?
 
Upvote 0
Thanks Andrew,

I'm using javascript to align row height and column width for my report and use to set margins etc., and for paper size i use xlPaperLetter constant ..likely i need paper size constant to set custom paper size..
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,229
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top