Thanks for reply Govert
I can get all of sheet ids below codes. And I confirmed the sheetid
wouldn't be changed
for a session even if i changed the sheet order or sheet name. Thanks
for your support
object result = XlCall.Excel(XlCall.xlfGetWorkbook, 16);
string workbookname = result.ToString();
object[,] sheetnames =
(object[,])XlCall.Excel(XlCall.xlfGetWorkbook, 1, workbookname);
string[] strsheetnames = new string[sheetnames.GetLength(1)];
for (int j = 0; j < strsheetnames.Length; j++)
{
strsheetnames[j] = sheetnames[0,
j].ToString().Split(']').LastOrDefault();
}
ExcelReference sheetRef =
(ExcelReference)XlCall.Excel(XlCall.xlSheetId, strsheetnames[0]);
Thanks
Park
On 6월7일, 오후3시40분, Govert van Drimmelen <
gov...@icon.co.za> wrote:
> Hi Park,
>
> You can get all the sheet names in a book with the C API using the
> GET.WORKBOOK function (xlfGetWorkbook). There was more on using the
> Get.XXX information functions in this discussion:
http://groups.google.com/group/exceldna/browse_frm/thread/9aa0666ca34....