The problem began when i installed this application in a windows server 2003 machine and im getting this error. after reading a few posts, i found that it can be a issue when i open the path to save my file, but im not to sure about that because im not using Apache POI directly but with a plug-in
im programming a Grails 2.2.3 Application, under OS X, i tested it on linux too and im also using the Excel Export Plugin http://grails.org/plugin/excel-export <- here is a link to it
as i said before this issue is only affecting in windows server 2003, im not sure about other versions like desktop, 2008, etc. but while i get a pc with one of those i did like to have a little help that will be very appreciated.
almost forgot, here is a sample of my code just in case:
def rptName = "web-app/Download_xlsx/" + UUID.randomUUID() + ".xlsx"
/* Define el reporte */
def reporte = new XlsxExporter("web-app/Templates/Template.xlsx", rptName)
reporte.putCellValue(x, 0, factura.noFactura)
reporte.putCellValue(x, 2, factura.fechaFacturacion)
reporte.putCellValue(x, 4, 0)
reporte.putCellValue(x, 5, factura.claveTF)
reporte.putCellValue(x, 6, factura.paisFacturacion)
reporte.putCellValue(x, 7, factura.monedaFacturacion)
reporte.putCellValue(x, 8, 1)
reporte.putCellValue(x, 9, factura.valorTMAF)
reporte.putCellValue(x, 12, "FLEE")
reporte.putCellValue(x, 13, factura.nombrePC)
reporte.putCellValue(x, 21, "FLEE")
reporte.putCellValue(x, 27, factura.noFactura)
reporte.putCellValue(x, 29, partida.fraccionArancelariaMercancia)
reporte.putCellValue(x, 30, partida.descripcionMercancia)
reporte.putCellValue(x, 31, partida.descripcionMercancia)
reporte.putCellValue(x, 32, partida.importeMercanciaSinFletesSegurosOtrosConceptos)
reporte.putCellValue(x, 36, cantidadComercial)
reporte.putCellValue(x, 37, partida.claveUnidadMedidaEnFactura)
reporte.putCellValue(x, 38, cantidadTarifa)
reporte.putCellValue(x, 39, partida.claveUnidadesTarifa)
reporte.putCellValue(x, 40, partida.clavePaisProduccionMercanciaDestinoFinalMercancia)
reporte.putCellValue(x, 41, partida.clavePaisVendeCompra)
reporte.putCellValue(x, 42, "S")
reporte.putCellValue(x, 44, 16)
reporte.putCellValue(x, 45, 1)
reporte.putCellValue(x, 46, 0)
reporte.save() <- according to grails here's where i get the error
here's also a question where i read about this error, however this seems to be not my issue :
Apache-POI: Unable to write to an existing workbook
*****UPDATED******
I Tested in 2 PC one with Windows 7 Ultimate and other with Vista Professional and the error appeared again! looks like this issue only occours in Windows
UPDATED I did a new test where i didn't use a template and it worked! apparently this bug only occours in windows enviroment