Load array variable from external xls file
I want to initialize an array variable using an external xls file.
I am trying with property loader step but I have to insert manuallly all the elements of the array.
Is there any other way to do this?
Thanks
Valter
Hi FiloP
When i open and close your example in my Teststand (Engine and Editor 4.0.0.326) Teststand asked me to save
some NI-Tpyes.ini !!!
That means my TS NI Types from release date: 2007-April-05 differes from yours.
There could be to two reasons: your files are conterminated or NI have relased a new update with newer step-types.
So until this not clear everbody should be carefully. Never acept savings to NI-Types when closing.
To get more information about this please visit this thread:
http://forums.ni.com/ni/board/message?board.id=330&message.id=17427#M17427
greetings from the lake of Constance, Germany
and get never affected by a type virus
juergen
HI Valter1,
tomorrow evening i will post a C# example.
greetings
juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Similar Messages
-
How to load a variable from an XML file?
I need to use an XML file so I can update one variable every
once in a while.
Let's say I want to load Variable "foofie" into a flash
movie, and the XML says that "foofie" is 11.
What code do I put in my flash file to read what 'var foofie'
is from an XML, and what do I put in the XML so I can frequently
update what number is stored in 'foofie'
Thanks!look up XML.load(url) in flash help, it's fairly simple
in the xml you put, for example
<foofie>11</foofie>
if foofie is in a database or some other dynamic place,
(which I assume, since you want to frequently update to its value)
you need to write a script, in php for example, that returns the
desired xml data -
Loading Variables from a php file
Im trying to get the stats from a shoutcast radio stations
into flash so i can manipulate them into a nicer looking site.
Anyway, ive identified the line on which the stats are
updated (its in a php file, line 48):
<stong>Current
Song:</strong></b><p><marquee>
Morel's Grooving Again - That Melody [Morel's
Groove Mix]</font></p>
and i was wondering the following things:
is it possible to have flash load only this line of text from
the php file,
how do i get flash to recognise "<stong>Curren Song" as
the variable
how to get flash to recognise the colon sign as meaning that
that is waht the variable is equal to,
and how, once flash recognises the parameter, to remove the
formatting code from the text.
Or is there an easier way of getting this variable into
flash, like using some kind of self-updating html file...
help would be much appreciated.
thanksu can convert the array in to a string in FLEX and in PHP u can use the "split" command...
here s sample program see if it helps u
http://flexarraytransfer.blogspot.com/
similary u can transfer VARIABLES also,in the place of the string just put ur variable on the PHP use t variable without spliting t -
How to load variables from a .txt file
Hi.
I usually make a flash aplication in colaboration with a php
programmer. But i want to test my swfs without having to wait for
him. So i want to do that through a text file. I know that flash
can load variables from text files. The problem is i don't know how
to format the text file ( example.txt).
Thank youHere's a couple of ideas.
First you probably want to change what you have...and put
your 'if (pVar==1' etc inside a separate function and call it from
the onLoad handler after you have assigned the value to pVar...
because the onLoad will run at some unknown point in time after
loading has finished (actually in the test environment this might
work... but that wouldn't be the same as what happens in a
production setting).
To create test files for loadvars... simply create a new as2
file and put this code on the first frame and test movie: -
At end of tether! Reading in variables from a text file
Hi all
My stress factor has gone through the roof because I am trying to read in from a text file (you may have seen some earlir questions about ArrayLists) it's just not working!
The code is below. The result is that it's reading in all of the car data, none of the motorbike and only the first line for the services. It's odd and it's driving me insane!
Here's an example of the data it's reading. There are about 7-10 sets of data per type
<car><reg>AB04CDE</reg><make>Ford</make><model>Fiesta</model><colour>blue</colour><passenger_no>4</passenger_no></car>
<service><service_no>13570</service_no><reg>J605PLE</reg><date>15:07:2006</date><miles>20000</miles><part_replaced>brake_pads</part_replaced><part_replaced>front_tyres</part_replaced></service>
<motorbike><reg>TT05EKJ</reg><make>Triumph</make><model>Speedmaster</model><colour>black</colour><load>20.50</load></motorbike>
Here's the code
while (moreToRead) {
String line;
try {
line = fileReader.getNextStructure();
// collect the data from the file
if (line.indexOf("<car>")> -1){
// Select/Extract the registration element
int nStart = line.indexOf("<reg>");
int nEnd = line.indexOf("</reg>");
String reg = line.substring(nStart+5,nEnd);
// Select/Extract the make element
nStart = line.indexOf("<make>");
nEnd = line.indexOf("</make>");
String make = line.substring(nStart+6,nEnd);
// Select/Extract the model element
nStart = line.indexOf("<model>");
nEnd = line.indexOf("</model>");
String model = line.substring(nStart+7,nEnd);
// Select/Extract the colour element
nStart = line.indexOf("<colour>");
nEnd = line.indexOf("</colour>");
String colour = line.substring(nStart+8,nEnd);
// Select/Extract the passenger_no element
nStart = line.indexOf("<passenger_no>");
nEnd = line.indexOf("</passenger_no>");
String passenger_no = line.substring(nStart+14,nEnd);
//convert string to int
int passengerInt = Integer.parseInt(passenger_no);
// declare new object car and assign the variables then add it to the array.
Car c = new Car (reg, make, model, colour, passengerInt);
carList.add(c);
} else if (line.indexOf("<bike>")> -1) {
// Select/Extract the registration element
int nStart = line.indexOf("<reg>");
int nEnd = line.indexOf("</reg>");
String reg = line.substring(nStart+5,nEnd);
// Select/Extract the make element
nStart = line.indexOf("<make>");
nEnd = line.indexOf("</make>");
String make = line.substring(nStart+6,nEnd);
// Select/Extract the model element
nStart = line.indexOf("<model>");
nEnd = line.indexOf("</model>");
String model = line.substring(nStart+7,nEnd);
// Select/Extract the colour element
nStart = line.indexOf("<colour>");
nEnd = line.indexOf("</colour>");
String colour = line.substring(nStart+8,nEnd);
// Select/Extract the load element
nStart = line.indexOf("<load>");
nEnd = line.indexOf("</load>");
String load = line.substring(nStart+6,nEnd);
//convert load string to double
double bikeLoad = Double.parseDouble(load);
// declare new object motorbike and assign the variables then add it to the array.
Motorbike m = new Motorbike (reg, make, model, colour, bikeLoad);
bikeList.add(m);
} else {
// Select/Extract the service_number element
int nStart = line.indexOf("<service_no>");
int nEnd = line.indexOf("</service_no>");
String service_no = line.substring(nStart+12,nEnd);
console.println("service = " + service_no);
nStart = line.indexOf("<reg>");
nEnd = line.indexOf("</reg>");
String reg = line.substring(nStart+5,nEnd);
console.println("service = " + reg);
nStart = line.indexOf("<date>");
nEnd = line.indexOf("</date>");
String date = line.substring(nStart+6,nEnd);
console.println("service = " + date);
nStart = line.indexOf("<miles>");
nEnd = line.indexOf("</miles>");
String miles = line.substring(nStart+7,nEnd);
console.println("service = " + miles);
nStart = line.indexOf("<part_replaced>");
nEnd = line.indexOf("</part_replaced>");
String part_replaced = line.substring(nStart+15,nEnd);
console.println("service = " + part_replaced);
//convert string to int
int dateOfService = Integer.parseInt(date);
//convert string to double
double milesAtService = Double.parseDouble(miles);
//convert service no to unique int
int serviceNo = Integer.parseInt(service_no);
// declare new object service and assign the variables then add it to the array.
Service s = new Service (reg, part_replaced, serviceNo, dateOfService, milesAtService);
serviceList.add(s);
catch (Exception e) {
// Run out of data
moreToRead = false;
} If anyone can spy anything that could be causing this I love your advice. I simply can't see it.
Johi jos,
we have been asked not to use a parser for this assignment. evil
tutor i think! lolYour example seems to imply that all the <tag> ... </tag> pairs have
to occur on a single line; if that is so, you can do some cheap
programming like this:String getText(String line, String tag) {
int start= line.indexOf("<"+tag+">");
int end= line.indexOf("</"+tag+">", start);
if (start < 0 || end < 0) return null; // no <tag> ... </tag> pair found
// return the text in between the <tag> ... </tag> tags
return line.substring(start+tag.length()+2, end);
}kind regards,
Jos -
Add one character at a time from External Text file
Hi,
I'm using Flash 8, and I have created a standard Dynamic
field that pulls the text from an external text file using the
LoadVars function and it works fine.
To get the correct effect for the design, I would like to be
able to create the illusion that the characters are being typed out
when the page loads as if someone has started typing and also hear
the "Typewriter Clack" each time a character appears.
The only place I have found an example is on the Syphon
Filter Game website which seems to have created the illusion
perfectly:
http://www.syphonfilterdarkmirror-thegame.com/en_IE/
(Check out the bottom right section)
I could create a Movieclip and add a character each frame
but, I would like to be able to edit the text when required via a
text file or even ASP or PHP if neccessary.
Any help would be grateful.
Cheersor here:
http://www.actionscripts.org/tutorials/beginner/Scripted_Typerwriter/index.shtml -
Adding html into edge animate text box from external js file
I have a text field in edge animate that I want to update with a score. The function that is used to click and update the score is in an enternal file so I'm trying to figure out how to get my edge animate div to be read by jquery in the external file. This is what I have so far in the external js but it isn't reading the edge animate text field properly:
external .js file:
AdobeEdge.coinCounter += 250; // this calls the variable coinCounter which was set in edgeActions.js and updates it from the original 0 value
alert(AdobeEdge.coinCounter); // this shows it works and updated correctly
var comp = AdobeEdge.getComposition("EDGE-172492634");
var stage = comp.getStage();
stage.sym.$("gameText").html(AdobeEdge.coinCounter); // this is where things go wrong. I want this updated value to read back into the textbox called "gameText" that is in the edgeAnimate composition
stage.sym.$("gameText").html("NewText"); // nothing reads to the "gameText" textbox; something must be wrong how I am referencing it outside of edgeActions in the external .js file
Would someone mind helping me reference the textbox "gameText" correctly so I can input my new value? Thank you!!Thank you. The learning curve is taking me awhile. It works now:
var checking = AdobeEdge.getComposition("EDGE-172492634").getStage().$("gameText").text();
alert(checking); //yay!
Thanks Joel! -
Use function from external Javascript file
Hi All,
Is it possible to use function from other javascript file. If possible then please post some example.
ShonkyAs Harbs mentioned, you can use doScript().
Maybe you can do something like this:
First I created simple function in separate file and exported it JSXBIN
function myAlert(myString){
alert(myString);
Then, I copied contents of that JSXBIN and put it into variable
var securedFUNCTION = app.doScript("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
or
var securedFUNC = eval("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
And simply called function
myAlert('My test String');
Also, you can use include external script with #include to call JSXBIN, but you need to wrap contents of JSXBIN file into doScript or eval().
tomaxxi
http://indisnip.wordpress.com/ -
Loading library assets from external .swf
Ok, so here's what I want to do. I'm creating an application
that has optional classes that it can instantiate based on what the
needs are. These classes operate things like Session Logging
utilities, etc. These items obviously have assets that they need
available such as movieclips and buttons. For example, the Session
Logger has a sessionLog_mc clip that has a log window with buttons
and the log display. I want to be able to have my class load the
external .swf that contains the assets for the Session Logger and
then use attachMovie(), once the .swf is loaded, to attach the
sessionLog_mc from the library of the loaded external .swf file.
This does NOT seem to work at all. This seems like it has to be
possible. I don't want to be forced to put all my code into
external .swf's too. I just want some external asset .swf's (or
maybe just one large one) that I can load. Is this possible? I am
wanting to have the ability to show the progress of loading each of
these components while the application is starting up and loading
the asset files. Thanks so much!
Here is an example of what I'm trying: (the attachMovie does
NOT work at all)I see now how to import and display a library class object
using:
var MovieClipClass:Class =
Class(loader.contentLoaderInfo.applicationDomain.getDefinition("myLibraryAsset"))
var movieClip:Sprite = new MovieClipClass();
addChild(movieClip)
But this seems to only work for SWF's published for AS3 Flash
Player 9.
I need to do the same for SWF's published with AS2 Flash
Player 7.
Any ideas? -
Read images from external jar file (Sun's Java L&F Graphics repository)
Hi!
I don't know how to read images from an external jar file. Sun has a Java Look and Feel graphics repository that contains a lot of good images that can be used on buttons and so on. This repository is delivered as a jar file, containing only images, and I want to read the image files from that jar file directly without including them inside my application jar file. The application and image jar files will be in the same directory.
I have absolutely no clue how to solve this. Is it necessary to include the images inside my application jar file or is it possible to have them separate as I want.
Would really appreciate some help!
Best regards
LarsHi,
There is two ways :
1) Add your jarfile to the classpath.
Use the class loader :
URL url = ClassLoader.getSystemResource("your/package/image.gif");
Image im = (new ImageIcon(url)).getImage();
or
Image im = Toolkit.getDefaultToolkit().getImage(url);2)If you don't want to add the jar to the classpath you can use this (under jdk 1.4):
import java.util.*;
import java.util.jar.*;
import java.awt.*;
import java.io.*;
import java.awt.image.*;
import javax.imageio.*;
public class ImageUtilities {
public static Image getImage(String jarFileName, String fileName) {
BufferedImage image = null;
try {
JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
JarEntry entry = jar.getJarEntry(fileName);
BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
image = ImageIO.read(stream) ;
catch (Exception ex) {
System.out.println(ex);
return(image);
}I hope this helps,
Denis -
How to load Test data from a Text file in ECATT
Hi,
I have created a test configuration with a test script, system data container, and test data container.
I have done the recording of a transaction and created the script. Parameterization is done for the script and have imported those parameters from script in to the data container.
I am trying to load a the data from a text file on the local work-station. The data is not being read.
Please explain this in detail (step by step) as I am very new to ECATT.
I am trying this on SAP ECC 6.0 IDES server.
Thanks in Advance
Vikas PatilPlease explain this in detail (step by step) as I am very new to ECATT.
Thanks in Advance
Vikas Patil -
Loading the data from a text file to a table using pl/sql
Hi Experts,
I want to load the data from a text (sample1.txt) file to a table using pl/sql
I have used the below pl/sql code
declare
f utl_file.file_type;
s varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
loop
utl_file.get_line(f,s);
insert into sampletable (a,b,c) values (s,s,s);
c := c + 1;
end loop;
exception
when NO_DATA_FOUND then
utl_file.fclose(f);
dbms_output.put_line('No. of rows inserted : ' || c);
end;
and my sample1.txt file looks like
1
2
3
The data is getting inserted, with below manner
select * from sampletable;
A B C
1 1 1
2 2 2
3 3 3
I want the data to get inserted as
A B C
1 2 3
The text file that I have is having three lines, and each line's first value should go to each column
Please help...
Thanksdeclare
f utl_file.file_type;
s1 varchar2(200);
s2 varchar2(200);
s3 varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
utl_file.get_line(f,s1);
utl_file.get_line(f,s2);
utl_file.get_line(f,s3);
insert into sampletable (a,b,c) values (s1,s2,s3);
c := c + 1;
utl_file.fclose(f);
exception
when NO_DATA_FOUND then
if utl_file.is_open(f) then utl_file.fclose(f); ens if;
dbms_output.put_line('No. of rows inserted : ' || c);
end;SY. -
How to load SQL scripts from a text file.
Hi, i tried several time to load a text file/SQL script with 10 different tables and data, but 10g Express doesen't allows me to do that, any one can direct me or point out to me what i should do or do i need to adopt any special method to to get this done. i am sure there must be some thing where you can upload SQL scripts from a text file (in SQL command editor!). thanks
Hi,
see my other answer here:
SQL command editor doesn't take more than 1 insert command
This seems to be a duplicate question, right? Or am I missing something?
Regards,
~Dietmar. -
How to get value for a global variable from an exel file?
Hallo all,
I am a beginner in LabVIEW and I have a problem in reading datas from an exel file . I would like to import a group of data with timestamps from exel file to a global variable. for ex. speed, acceleration and position of 4 different sensors to each of its global variable.
It will be very nice if anyone can give me some ideas.
Thanking you in advance...continued here
-
Using XML for Live Data- How do you get the XML file to pull data from another xls file?
Post Author: joseph_atkinson
CA Forum: Xcelsius and Live Office
I was wondering you can help me.
I am currently receiving an *.xls reports on a daily basis (same report, same format, different data). I have put this report into Crystal Xcelcius Designer 4.5 Professional version and created the dashboard I want.
I am aware of the xml mapping functionality where I can map from the *.swf straight to a database. However, is it possible to map to an xls file that will change on a daily basis? (obviously I can you the refresh button in Designer, but I need to automate this process).
Your help really would be appreciated.
JoeIn Firefox, I'm seeing a bad icon for your zip files. I can
download it,
but it looks like something might be amiss with your zip
files
themselves.
Al Sparber - PVII
http://www.projectseven.com
Popup Menus | Image Galleries | CSS Tutorials & Templates
Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
DW Newsgroup: news://forums.projectseven.com/dreamweaver/
"Conjurer" <[email protected]> wrote in message
news:e8upg1$kee$[email protected]..
> Conjurer wrote:
>> Boy - I thought this was as simple as creating an
<a> tag link to the
>> file like you do with Word docs and Excel xls files.
So I wrote my
>> link as follows:
>>
>> <li><a
href="OMGMASalSvy/Survey.zip">2006 Adminsistrators
>> Survey.zip</a></li>
>>
>> But when I click on it I get a big nothing!
>>
>> I put the files out there on the host and the
Word/Excel links all
>> work great.
>>
>> Is there some secret magic to this one?
>>
>> My page links are at:
http://www.omgma.com/surveyforms.htm#Documents
>>
>> Thanks for any help.
>
>
> I guess it is working in IE but not in Firefox.... hmmm
Maybe you are looking for
-
Database Applications Table (GTC): Moving fields across to resource
All, I have a Sun Java System Directory Server resource and a Database Applications Table (GTC) connector. The Database Applications Table is a trusted source for incremental reconciliation against an Oracle database. For simplicity's sake, assume th
-
When you downloaded the latest version of Firefox on July 2/11 I lost all my picture files
When you downloaded the latest version of Firefox on the 2nd of July all my pictures were wiped out even my desktop wallpaper which was one of my pictures. I have looked in all the places I could think of but haven't been able to find them. To try an
-
Macbook Pro and Windows Professional XP
I bought Windows Pro XP for my Macbook Pro. While going through similar discussions I've found myself confused as to whether or not I can even run Windows Pro XP. Can I or can't I. It hasn't arrived yet and if I need to buy the home edition rather th
-
Dictionary on my dashboard is not working. any suggestions?
dictionary on my dashboard on my desktop is not working. any suggestions?
-
HT1338 Error Displayed on clicking 'Update' for Safari update.
I am geting the following error on clicking the Update button for the safari 6.0.2 software update The operation couldn't be completed. (NSURLErrorDomain error -3001.)(102)