Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]XLSX output is "corrupt"

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]XLSX output is "corrupt"
 Login/Join
 
Virtuoso
posted
I have a compound document procedure, producing a multi-tab Excel (.xlsx) file. Excel issues a warning...

(i) Excel found unreadable content in .... Do you want to recover the contents of this workbook? ...
and when I respond yes, it issues

(!) The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt.

Any ideas what could cause this?

Excel 2010
WF 8105

This message has been edited. Last edited by: <Emily McAllister>,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Not sure if its OK in 8.1.05, but I was under the impression that com pound report in XLSX didn't work.

Note: I think I found this in 7.7.x


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Use EXL07 format instead of .XLXS. hope that helpsSmiler


WebFOCUS 8
Windows, All Outputs
 
Posts: 11 | Registered: February 12, 2016Report This Post
Virtuoso
posted Hide Post
I've seen that happen in various scenario's:
  • Template contains buttons or comments
  • Data contains a < symbol
  • A cell is referencing something that's not in the sheet or in any of the sheets that the WF environment can access.


(Updated)

This message has been edited. Last edited by: Wep5622,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
WAZ: "I was under the impression that compound report in XLSX didn't work."
-- Let's say it sometimes works: It was working fine for an earlier version of the same set of component reports. And the reporting step of the component fexes is unchanged, as far as I can see, yet... -- I've asked the support team here to check whether anything changed in configuration of wf client or server.

WEP: "Data contains < or > symbols" --
I had some <+0>'s but that's gone, and the problem persists.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
We had a similar issue when we had < symbol in our column title. Ex: COL1 AS '<1 year'
Adding a space before < solved the issue. ie) ' <1 year'

It happened only with <. > symbol had no issues.

This message has been edited. Last edited by: WF1326,


WebFOCUS
7703/7705/8105m/8201m/8202m

 
Posts: 99 | Registered: September 10, 2013Report This Post
Virtuoso
posted Hide Post
For the record, I changed XLSX to EXL07. Made no difference.

No surprise there; they are synonyms.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
What helps in finding the cause is to save the generated XLSX sheet and unzip it. The resulting directory contains a bunch of XML files that you can use an XML validator on.

Web browsers can do that, but a tool that can validate the entire directory at once and lists the file/line/error message would be quicker. Trouble is, I only just now realise that something like that probably exists, so I don't know of any Wink

If that's not it, ten the XML is syntactically valid and the problem is in the semantics somewhere. That usually means there is a reference somewhere that points to something that's not available.

A common case is that someone copied cells over from another sheet into a template; Excel will be referencing that other sheet that's not available on the WF environment.

Oh, not unimportant, you did set this, I hope?
ON TABLE SET HTMLENCODE ON

Without that, special XML characters won't be escaped correctly (that may even fix the issue with the < symbol, I don't recall).


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
You can also use the 'SET HTMLENCODE=ON' syntax.

Also check your code page can output any special characters in your report. I had XLSX reports bombing out because there were trade mark and copyright characters in several description columns. Using code page 1252 solved this issue.


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
 
Posts: 115 | Location: Seattle, WA | Registered: April 07, 2015Report This Post
Virtuoso
posted Hide Post
Progress report [I started writing before I read the last two responses]

1. All four component reports, when run individually (outside the Compound context) exhibit the same NOGO behavior (normal completion, but complaint from Excel). So it's apparently not a Compound Document issue per se .

2. Working on one of the four patients, removing its STYLE code got rid of the issue.

3. When I restored the STYLE lines, and inserted ON TABLE SET HTMLENCODE ON, it was NOGO again.

4. Finally, after imbedding the included styling and playing Trap the Fox, in turned out that TITLETEXT was the culprit -- but only when the value was coded as an amper var reference:
TYPE=REPORT,
    TITLETEXT='&my_var',
$


When I replaced that with a literal value
TYPE=REPORT,
    TITLETEXT='my tab name',
$

the problem evaporated.

This goes against everything I ever learned about FOCSTACK -- by the time TABLE is executed, it should never know that the value was not hardcoded as 'my tab name'.

Somehow, the &my_var was taken literally, and (perhaps) the "&" character created a bellyache.

Do any of the wizened ex-Focus coders out there believe this?

-Jack
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Further food for thought.

We're dealing with Managed Reporting here, so the fex resides as a blob in the Content repository and has to be uploaded to WFRS at execution time.

My impression is that all the -INCLUDE's are uploaded by including a series of EX -LINES blocks as a preface in the execution stream. My thought is, if Client has to escape any ampersands appearing in fex code, there is room for Client to err and present the &var name as a literal value.


Flashback -- I few hours ago, I briefly tried to fall back to EXL2K, and when I opened the output in Excel, the tab name was &LOC_TITLETEXT (!). I thought little of it at the time, other than to conclude that we can rule out EXL2k. But AHA! -- that symptom is consistent with this hypothesis. Horrible thought for any customers who bought into letting MR own the code.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Hi Jac,
Did you try these:
  
'&my_var.EVAL'
'&|my_var'
The above 2 without quotes.

Kinda of amazed an ampere would break XLSX output...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
quote:
My impression is that all the -INCLUDE's are uploaded by including a series of EX -LINES blocks


Yes, I also think that is the way its done.

You can see the loaded fexes by issuing the command ? LOAD. The fexes are loaded into memory only.

I would also try the .EVAL option, had at least one other instance where I had to add the .EVAL


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Hello Jack,

I had the same exact behavior last week, had two worksheets spitting out in Excel and it was fine until I added the third worksheet. Banged my head against the desk for an hour or so, then it dawned on me that I had an amper in my TITLETEXT. Sure enough removed the amper value and viola it worked. Apparently, no matter if you have it within ticks or not it treats that differently than just a variable call or raw text value. I had to avoid the amper and find a different worksheet name for the end user.

-JC


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Master
posted Hide Post
Using:

TITLETEXT='&TITLE.EVAL',$

doesn't work? It works for me.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Guru
posted Hide Post
Same issue - I had an ampersand in the data, and I happened to be using that field as the primary sort and wanted a separate tab on the spreadsheet for each primary sort value. In my case, it's a data field I use lot, so I went into the MFD and did a DEFINE on the field, replacing the ampersand with the word "and". Works fine now. At first I thought Excel was choking on my logo, then I realized it was the ampersand, and I initially thought it was any ampersand, but no, just when it's your sort field.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Guru
posted Hide Post
I also found this on the tech support site - if you remove MR_FULL_FEXNAME (pass) from your site.wfs it should solve the problem. That solved it for me.

It's doc id 20363540 by the way.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Guru
posted Hide Post
I also just found that setting PRINTPLUS = ON will help in certain cases.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]XLSX output is "corrupt"

Copyright © 1996-2020 Information Builders