1
LibXL을 사용하려고합니다. 시트에서 데이터를 추출 할 수 있지만 Excel 행 및 열 인덱스가있는 문자열을 startRow, endRow, startCol, endCol 즉LibXL xlSheetGetNamedRange가 작동하지 않습니다.
"A1 : B3"startRow = 0, endRow = 2, startCol = 0, endCol = 1 (LibXL은 0 기반 색인 생성을 사용함)
나는 내가 생각할 수있는 모든 것을 시도했다. 라이브러리에는이 함수를 사용하는 예제가 포함되어 있지 않으며 설명서는 매우 희소합니다. 내가 도대체 뭘 잘못하고있는 겁니까? 이 목적을 위해
int main()
{
const char range[] = "B2:C3";
int i, ret, rowFirst=0, rowLast=0, colFirst=0, colLast=0;
BookHandle book;
SheetHandle sheet;
book = xlCreateBook();
ret = xlBookLoad(book, "/home/jason/Downloads/panel.xls");
sheet = xlBookGetSheet(book, 0);
ret = xlSheetGetNamedRange(sheet, &range[0], &rowFirst, &rowLast, &colFirst, &colLast);
printf("ret from xlSheet...Range = %d\n", ret);
printf("%s\n", xlBookErrorMessage(book));
printf("rowLast = %d\n", rowLast);
printf("rowLast = %d\n", rowLast);
printf("colFirst = %d\n", colFirst);
printf("colLast = %d\n", colLast);
return 0;
}