Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 22nd, 2009, 10:37 AM
Allegra Allegra is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 14
Question need help taking information from uploaded exel file

Hey,

I was wondering if there was any way i could make a rule that would take the information from a specific cell of an excel file my customer uploads and return that information as text in my piece.

Or if you have any better way of uploading versioned pricing for 60+ items on a menu, please let me know.

Thanks,
Meir Galimidi
Reply With Quote
  #2  
Old July 23rd, 2009, 03:46 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,364
Default Re: need help taking information from uploaded exel file

If the "cell" is just a specific row and column in the Excel file, and it can be exported as a CSV or tab-delimited file, then you could use the ExternalDataFileEx object to access the particular row and column, something like this:
Code:
var file = new ExternalDataFileEx("myfile.csv", ",");
return file.GetFieldValue(RowNumber, ColumnNumber);
If your question is specific to FusionPro Web, I recommend asking it in the Web-to-Print subforum.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #3  
Old August 6th, 2009, 09:42 AM
Allegra Allegra is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 14
Default Re: need help taking information from uploaded exel file

Thanks Dan,
just a quick clarification.

var file = new ExternalDataFileEx("myfile.csv", ",");
return file.GetFieldValue(RowNumber, ColumnNumber);

what are in the two spaces between the commas on that first line of code with the single quote? Do i put any information there or leave them as a single quote each?

-Meir Galimidi
Allegra Print and Imaging
Reply With Quote
  #4  
Old August 6th, 2009, 01:20 PM
Allegra Allegra is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 14
Default Re: need help taking information from uploaded exel file

I think I need to be a bit more specific. Bare with me, I’m fairly new to this.

I am trying to make a versioned item. There are 41 different variables, 32 of which are prices.
I don’t want to make my customers have to type in 41 different text boxes, so I was hoping I could save them the trouble by having them upload an excel file that we would provide the template for. This way all their prices are arranged how we want them.

Is there any way they can upload an excel file with a versioned product, and take information from that excel file to put into different text boxes.

I tried out Dan’s method, slightly altered to this:

var file = new ExternalDataFileEx("15015prices.csv","","");
return '<superscript>'+"$"+'</superscript>'+file.GetFieldValue(100,'B')+" "+'<superscript>'+"$"+'</superscript>'+file.GetFieldValue('100','C')+" "+'<superscript>'+"$"+'</superscript>'+file.GetFieldValue('100','D');

It only returns the superscripted dollar signs without the spacing or field values.

Can this work on a versioned item? and if it can, any ideas as to how can i make it work?

I am using fusion pro 5.8, adobe acrobat professional 8.1, and windows XP


-Meir Galimidi
Allegra Print and Imaging
Reply With Quote
  #5  
Old August 7th, 2009, 09:58 AM
rpaterick rpaterick is offline
Senior Contributor
 
Join Date: Mar 2009
Posts: 427
Default Re: need help taking information from uploaded exel file

Meir,

Have you seen this post? http://forums.printable.com/showthread.php?t=392

I'm thinking this is what you want or maybe it needs to be modified in some manner.

Ryan
__________________
Windows 7 64BIT
Intel - I7 chip - 3.33Ghz - 6GB ram
8.0 Creator/8.0 Producer/CS5.5
Reply With Quote
Reply

Tags
excel, javescript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.