As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hey everyone, I am using the FILEDEF command to send a report to a specified location, but each time I open the file in excel, Excel tells me it is corrupted.
If I specify the file as something other than xlsx it works properly. The problem is that I really need it as xlsx. Can anyone help?
So this doesn't work:
APP PATH IBISAMP
-UNIX rm /filepath/cartest.xlsx
FILEDEF CARSEND DISK /filepath/cartest.xlsx
-RUN
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 20
ON TABLE HOLD AS CARSEND FORMAT XLSX
END
But this does:
APP PATH IBISAMP
-UNIX rm /filepath/cartest.csv
FILEDEF CARSEND DISK /filepath/cartest.csv
-RUN
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 20
ON TABLE HOLD AS CARSEND FORMAT COMT
END
Any ideas why the FILEDEF would have problems with XLSX and not COMT?This message has been edited. Last edited by: rray9895,
-SET &ECHO=ALL;
-* File rray01.fex
FILEDEF CARSEND DISK BASEAPP/CARSEND.XLSX
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY BY CAR BY BODYTYPE
ON TABLE HOLD AS CARSEND FORMAT XLSX
END
I see you are on a UNIX box. Could this be the reason? Did you try using FORMAT EXL2K or EXL07?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Originally posted by Danny-SRL: This worked fine for me:
-SET &ECHO=ALL;
-* File rray01.fex
FILEDEF CARSEND DISK BASEAPP/CARSEND.XLSX
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY BY CAR BY BODYTYPE
ON TABLE HOLD AS CARSEND FORMAT XLSX
END
I see you are on a UNIX box. Could this be the reason? Did you try using FORMAT EXL2K or EXL07?
I tried EXL2k and EXL07 with the file extension of .xls in the FILEDEF path, but got the same error on opening in Excel:
The file format and extension of 'carsend.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyways?
APP PATH IBISAMP
SET EXCELSERVURL = ''
-UNIX rm filepath/cartestxlsx.xlsx
FILEDEF CARSEND DISK filepath/cartestxlsx.xlsx
-RUN
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 20
ON TABLE HOLD AS CARSEND FORMAT XLSX
END
I'm working with our IT staff after reading this. WebFOCUS is hosted offsite, and the filepath is actually a mount point. From the mount point, the file is FTP-ed over to a network location on my local network. The file I am trying to open is the one that is FTP-ed over. I'm going to see if the IT staff at the location can open the file at the mount point to find out where the corruption is happening.
It sounds like something may be broken with the file transfer. I don't know why it would handle CSV and TXT files perfectly, but have issues with XLSX. I will update this thread with whatever information I get from the IT staff.
We got the issue resolved. I asked the IT staff what the problem was and they indicated that it related to "Ascii/Binary" detection. Not sure what that means, but I'm leaving it here just in case it can help any future person who encounters this weird issue.