Hi,
I have a excel file, there is a Name "resultset1" defined, then i use following code to update the Area of the Name, but it seems no changed. Can you help me on this? thanks!
xlsName := xlsApp.Names.Find('name_' + sn);
if xlsName <> nil then
begin
xlsName.Definition := '''' + xlsSheet.Name + '''!$A$'+inttostr(j+1)+':$' + GetColumnName(pgPreview.ColCount-1) + '$'+inttostr(row);
// Workaround. XLS problem here?
if xlsApp.Version = xvExcel97 then
begin
if xlsSheet.Index = 0 then
xlsName.Area.SheetIndex := 1
else if xlsSheet.Index = 4 then
xlsName.Area.SheetIndex := 3;
end;
end;