NisHera
5 years agoValued Contributor
Saving XL file gives disc full error
Hi,
When I' saving excel file in script gives "disck full" error.
have around 45GB file is just 75KB.
following is code...
function WriteExcelSheet(){ var todayD, hireDate ; var xlRange,rowCount,adjtTotal; var app = Sys.OleObject("Excel.Application"); var book = app.Workbooks.Open(dtaFile); var sheet = book.Sheets('mySheet'); todayD = aqDateTime.Today(); hireDate = aqDateTime.AddDays(todayD, -85); Log.Message(aqConvert.DateTimeToStr(myDate)); app.DisplayAlerts = false; app.Visible = true; //xlRange = app.Range('A1').Activate(); rowCount = sheet.UsedRange.Rows.Count+1 Log.Message('Number of rows = '+rowCount); for(j=11;j<rowCount;j++){ app.Cells(j,10) = hireDate; } book.Save(); Delay(7000); app.Quit(); }
the error fire at book.Save();
This dosn't happen ervery time but after running long time randomly