The Artima Developer Community
Sponsored Link

C# Answers Forum
how to add page break using c# with floating range

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
jennifer zhong

Posts: 1
Nickname: jenjen
Registered: Oct, 2007

how to add page break using c# with floating range Posted: Oct 4, 2007 2:21 PM
Reply to this message Reply
Advertisement
My problem is the excel spead sheet is a floating range, and after
that I inserted a graph, then I need to add a page break. I think i
need to count the i++ and the length of pixel, when i is larger than
the height, that's the row I put the page break.
Below is the code I already have.

counter++;

//determine the position of the charts to come
oRng = oSheet.get_Range("B1", "I" +
counter.ToString());

float fWidth = (float)Convert.ToDouble(oRng.Width);
float fTop = (float)Convert.ToInt32(oRng.Height);
//for (int i = 1; i < counter; i++)
//{
// oRng = oSheet.get_Range("A" +
counter.ToString(), Missing.Value);
//fTop += Convert.ToInt32(oRng.RowHeight);
//}
//counter++;
//Place FICO Distribution Picture
//oRng = oSheet.get_Range("A1", "I" +
counter.ToString());
//fTop = (float)Convert.ToDouble(oRng.Height);
//fWidth = (float)Convert.ToDouble(oRng.Width);
oSheet.Shapes.AddPicture(ImageTable["LTV
Strat"].ToString(), Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.m soCTrue, 295, fTop, 290, 180);
oSheet.Shapes.AddPicture(ImageTable["FICO
Strat"].ToString(), Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.m soCTrue, 585, fTop, 290, 180);
//increase counter to set it on the first row after
the map
/

//add page break

I am very new to C#, can any one write a code to show me how to finish
this? Thanks!!

Topic: compilation error - method not found in class java.lang.string Previous Topic   Next Topic Topic: plz, how to shutdown????????

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use