How to find Excel Page Break?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have found on internet to get information how to find cell page break, but
i can't found it. can you help me?

thank you very much

Best Regards
Hasan Widjaya
fujitsu system indonesia
-Analyst Programmer-
 
Hasan,
Each WS has a .Horizontal/VerticalPageBreaks collection you can enumerate,
each giving details about its type, position etc.

NickHK
 
thanks NickHK, i found this function and i have to try it. but there is some
problems here.

if in one sheet have two pagebreak, there is error while getting the second
row pagebreak.



public string SetPageBreak(int Columns)
{
int xRow;
string RowPage = "";

try
{
for(int i = 1; i <= xlWorksheet.HPageBreaks.Count; i++)
{
xRow = xlWorksheet.HPageBreaks.Location.get_Offset(-1,0).Row;
SetBorder(xRow, 1, xRow, Columns, BorderIndex.EdgeBottom);

RowPage += xRow.ToString() + ",";
}

return RowPage;
}
catch(Exception ex)
{
return RowPage;
}
}
 
Hasan,
Should you be working with the Vertical PageBreaks, instead of the
Horizontal ?

NickHK

Hasan Widjaya said:
thanks NickHK, i found this function and i have to try it. but there is some
problems here.

if in one sheet have two pagebreak, there is error while getting the second
row pagebreak.



public string SetPageBreak(int Columns)
{
int xRow;
string RowPage = "";

try
{
for(int i = 1; i <= xlWorksheet.HPageBreaks.Count; i++)
{
xRow = xlWorksheet.HPageBreaks.Location.get_Offset(-1,0).Row;
SetBorder(xRow, 1, xRow, Columns, BorderIndex.EdgeBottom);

RowPage += xRow.ToString() + ",";
}

return RowPage;
}
catch(Exception ex)
{
return RowPage;
}
}




NickHK said:
Hasan,
Each WS has a .Horizontal/VerticalPageBreaks collection you can enumerate,
each giving details about its type, position etc.

NickHK

break,
but
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top