O
obrienkev
Hi,
How do I get data to display in the bottom half of the split pane?
I have 2 separate database queries now and I want the results of the first
one to appear in the top half and the results of the 2nd one to appear in the
bottom half.
Here's my split code...
oWB = (Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
oSheet = (Excel._Worksheet)oWB.ActiveSheet;
Excel.Window xlWin = oXL.ActiveWindow;
xlWin.SplitVertical = 216f;
then queryA results...
int rowIndex = 2;
foreach (DataRow row in this.myDataSet1.Tables["myTableAdapter"].Rows)
{
string ExcelAccount = row["Account"].ToString();
string ExcelType = row["Type"].ToString();
string ExcelCurrency = row["Currency"].ToString();
oSheet.Cells[rowIndex, 1] = ExcelnAccount;
oSheet.Cells[rowIndex, 2] = ExcelType;
oSheet.Cells[rowIndex, 3] = ExcelCurrency;
rowIndex++;
}
QueryA should display in the top half only.
QueryB(similar code) should then display in the bottom half only.
Following the below example...
http://support.microsoft.com/kb/302084
Thanks.
How do I get data to display in the bottom half of the split pane?
I have 2 separate database queries now and I want the results of the first
one to appear in the top half and the results of the 2nd one to appear in the
bottom half.
Here's my split code...
oWB = (Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
oSheet = (Excel._Worksheet)oWB.ActiveSheet;
Excel.Window xlWin = oXL.ActiveWindow;
xlWin.SplitVertical = 216f;
then queryA results...
int rowIndex = 2;
foreach (DataRow row in this.myDataSet1.Tables["myTableAdapter"].Rows)
{
string ExcelAccount = row["Account"].ToString();
string ExcelType = row["Type"].ToString();
string ExcelCurrency = row["Currency"].ToString();
oSheet.Cells[rowIndex, 1] = ExcelnAccount;
oSheet.Cells[rowIndex, 2] = ExcelType;
oSheet.Cells[rowIndex, 3] = ExcelCurrency;
rowIndex++;
}
QueryA should display in the top half only.
QueryB(similar code) should then display in the bottom half only.
Following the below example...
http://support.microsoft.com/kb/302084
Thanks.