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] Upload an excel file, extract the values and export it to the Query file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Upload an excel file, extract the values and export it to the Query file
 Login/Join
 
Member
posted
Hi guys,

I require help on this i.e.
First I'd like to upload an excel file from local
Then extract the values (which has got numbers) from that excel file and
Pass those values to the Q-file(query).


Thanks in advance.


Regards,
Krithik

This message has been edited. Last edited by: Kathleen Butler,


WebFOCUS 8
Windows, All Outputs
 
Posts: 2 | Registered: March 04, 2016Report This Post
Virtuoso
posted Hide Post
If you're on 8.x you should be able to right click a content folder and click Upload. It'll walk you through ingesting an Excel file and create a synonym for it. I'm not sure what a Q-file is but if you have a report, you can point your WHERE test to a synonym (presumably the synonym you just created for the uploaded file).

I think the syntax is:
WHERE FIELDNAME IN FILE FILE_NAME;


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
Hi BabakNYC,

Thanks for the reply. Can you please detail us , as we are new to webfocus.


As of now this is the approach ,we are using for the excel upload functionality to work:

1)We are using the for browsing the file.

2)We have a javascript function which reads the Excel file and extracts the data. But here we have an issue i.e. the javascript FileReader does not seem to work inside the fex file.( We believe that its because we are using the older version of html. Please find below the HTML doctype

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">)

Based on the requirements, we are supposed to read the data from the excel sheet and then pass it to the query. But reading the Excel file has become an issue.

This is the error message.

SCRIPT5009: 'FileReader' is Undefined


This is what we have used in the for browsing to the file:





This is the Javascript code.


function collectListForFexNoPadMultipleSample(){
var fileUpload = document.getElementById("fileUploader");
var out=0;
var regex = /^([a-zA-Z0-9\s_\\.\-:])+(.xls|.csv|.txt|.xlsx|.xlsm)$/;
if (regex.test(fileUpload.value.toLowerCase())) {
if (typeof (FileReader) != "undefined") {
var reader = new FileReader();

reader.onload = function (e) {
var ListStrg = "";
var rows = e.target.result.split("\n");
for (var i = 0; i < rows.length; i++) {
var cells = rows[i].split("\t");
for (var j = cells.length-1 ,k = j ; j >=0; j++) {
ListStrg = ListStrg + k + '=' + cells[j];
out=k;
k+1;
}
}
return (out+ListStrg);
}

} else {
alert("Html5 version is not supported for this.");
}
} else {
alert("Please upload a valid CSV file.");
}
}

Thanks in advance.

Regards,
Krithik

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 2 | Registered: March 04, 2016Report 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] Upload an excel file, extract the values and export it to the Query file

Copyright © 1996-2020 Information Builders