Trouble with array to spreadsheet string

I am having trouble with the array to spreadsheet string.
I have a 1-d array of string, the output spreadsheet string never puts a space on the first row, but all others.
example:
05:59:29.170    00000101     8        00 00 07 00 0B 0E 0D 0C
 05:59:29.198    00000100     8        00 00 3A 3A 39 39 39 39
 05:59:29.220    00000101     8        00 00 07 00 0B 0E 0D 0C
 05:59:29.248    00000100     8        00 00 39 39 39 39 39 39
format string is %s and default tab is delimiter.
this is screwing up my program because of the "scan for string" function can't be used correctly if the spreadsheet string isnt consistent.
Any suggestions?
Thanks

You don't need to use "array to spreadheet string": You could use plain formatting for full control over the output.
Still, your observation is a bit odd. Could you attach a simple VI that shows the behavior? (Put your input array into a diagram constant).
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Having trouble converting array to spreadsheet string, storing the file and coverting back to array with complex numbers

    I am working with a network analyzer. I have arrays made of 5 columns the first consisting of an integer and the next four consisting of complex numbers. I am converting the array into a spreadsheet string and then saving the file using the write characters to a file VI. That seems to work well as when I open the file in Excel all the data is there. However when I try to reverse the process, open file and convert back to array, I loose some of the data. Specifically the imaginary parts of my complex numbers are all going to zero. I have narrowed down the problem to be in the conversion from spreadsheet string to array and vice versa. I
    think the problem may be with the 'format' input to the VI. I do not have an adequate resource for this so I am not sure what to put in to accomplish my task. Any takers?

    Hi Biz
    I don't think there is a direct way of converting a complex number to a
    string, so when you convert the array to a spreadsheet string, the
    numbers would be converted to real data.
    However, you could try separating the real and imaginary parts using the
    "Numeric: Complex to Re/Im" function, and then store these - either in
    separate files or in adjacent columns/rows in the same file. Then, when
    you read in the data again, use the "Numeric: Re/Im to Complex" function
    to put the two "halves" together.
    If you actually want Excel to interpret the numbers as imaginary, then
    you'll probably want to create a string for each complex number of the
    form "Re + Im*i" (after separating the Re and Im parts), by using
    "String:Format into String" with 2 numeric inputs and the format string
    "%f+%fi".
    Reading the data back into Labview then would require splitting the
    string into the 2 pieces by using "Stringcan from String" with 2
    numeric outputs (smae precision as original numbers specified by the 2
    Default Value inputs) and the same format string "%f+%fi", and then using
    the above-mentioned "Numeric: Re/Im to Complex" function. It worked for
    me, so if you can't follow what I am describing, send me an email and I
    can email you what I did (LV 5.1.1).
    Paul
    Biz wrote:
    > Having trouble converting array to spreadsheet string, storing the
    > file and coverting back to array with complex numbers
    >
    > I am working with a network analyzer. I have arrays made of 5 columns
    > the first consisting of an integer and the next four consisting of
    > complex numbers. I am converting the array into a spreadsheet string
    > and then saving the file using the write characters to a file VI. That
    > seems to work well as when I open the file in Excel all the data is
    > there. However when I try to reverse the process, open file and
    > convert back to array, I loose some of the data. Specifically the
    > imaginary parts of my complex numbers are all going to zero. I have
    > narrowed down the problem to be in the conversion from spreadsheet
    > string to array and vice versa. I think the problem may be with the
    > 'format' input to the VI. I do not have an adequate resource for this
    > so I am not sure what to put in to accomplish my task. Any takers?
    Research Assistant
    School of Physiotherapy, Curtin University of Technology
    Selby Street, Shenton Park, Western Australia, Australia. 6008
    email: [email protected]
    Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
    "Everyone who calls on the name of the Lord will be saved." Romans 10:12
    "For all have sinned and fall short of the glory of God, and are
    justified freely by his grace through the redemption that came by Christ
    Jesus." Romans 3:23-4

  • Array To Spreadsheet String and DDE

    I have an array (one dimensional) that I want publish as a dde topic.
    So far I've been able to write all my dde components appear to be working,
    with the exception of the dde set value function in conjunction with Array
    To Spreadsheet String function.
    Array to spread appears to parse the the array the way I want it (that is,
    to create one
    big string with newline chars seperating tokens) but it's output does not
    seem to set correctly. If I look at the value right after I convert it to
    a spreadsheet
    string its good, but if I check it (once it's been loaded) using
    DDE Srv Check Item it comes up blank.
    Does anyone know what I'm doing wrong? I'm feeding the output of array
    to spread driectly into DDE Srv Set Item, shou
    ld it be going through another
    function first? Or am I using the wrong function to parse my array? My
    DDE
    server seems to work ok if I just use single string values, is there something
    about using arrays that I should be aware of? Any feedback is appreciated.

    Hi aschipfl,
    some thoughts about your suggestion:
    - When you want to suggest improvements to LabVIEW you should post in the Idea Exchange.
    - NI will not change the behaviour of functions existing for a long time…
    - NI will probably update the LabVIEW help for that function…
    - a spreadsheet string needs some kind of delimiter, what's the purpose of creating a spreadsheet string without them?
    When you really need a "Array to Spreadsheet String" without delimiters you could take this approach:

  • Array to spreadsheet string - remove space after delimiter

    Hi
    I created a Labview program to acquire a electrical signal and send it using TCP/IP.
    The image in attachment shows a piece of my code. The AQ subVI was created by me to accomplish the acquisition.
    However, the string that the "array to spreadsheet string" VI returns is something like this:
    -0.800781^ -1.030273^ -1.098633^ -0.942383^ -0.644531^ -0.209961^ 0.258789^ 0.712891^
    The VI is using the ^ character as a delimiter and it is converting commas to points as decimal separators.
    Now, what i would like to do is to remove the space character between the ^ character and the sample value, simply because that is what the receiver of the TCP/IP message wants.
    Can anybody help me?
    Thanks in advance
    Attachments:
    Array to spreadsheet.png ‏7 KB

    hi there
    remove the space between the ";" and "%" in your format specifier.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Deleting all elements from array and array to spreadsheet string

    Hello,
    I would like to write a new data file for each "recording" session without closing the VI.  My problem is that the last "recording" session's data is at the top of every successive session's text file.  I do not want this.  I've tried to delete all rows from the array after my array to spreadsheet string function, but I think the problem is somewhere with the shift register and how the array is built.  I'm not too familiar with LabView and this aspect of my interface is driving me crazy.  Attached is my code and two successive data files.  I have not been able to find a solution on these or the LAVA forums.  Any help would be appreciated.
    Also, I know there is an easier way to write this kind of streaming data, but I need to do it this way for other devices and synchronization purposes.
    Attachments:
    testsecond.txt ‏90 KB
    test41.vi ‏80 KB
    testfirst.txt ‏78 KB

    A few more comments to your code:
    Your loop does not have a wait, meaning it spins the empty case millions if times per second, consuming all CPU while not doing anything. Add an indicator to [i] to see.
    To clear a 2D array in one case frame, just don't wire the output tunnel and set it to "use default if unwired". You'll get an empty array. No fancy tools needed.
    I probably would use an event structure and also protect the data if the save dialog is canceled.
    Here's a simple draft that probably requires a bit more work but should show some of the ideas.
    You should also
    add some protection that the VI cannot consume all available memory if it runs forever.
    Create a seperate case to save the data later if the file dialog is cancelled the first time.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    test41MOD.vi ‏107 KB

  • \0D and \0A after array to spreadsheet string conversion

    Hi guys, i currently have a VI that manipulates a couple of arrays and writes them to a config file through the config VI.
    Now, i notice 1 problem whereby after my array is comma delimited and converted into a spreadsheet string, a tab and carriage return automatically appears at the end of the string. This causes my resulting config file to have \0D and \0A to appear with my keys in the config file.
    I know it's got to be the array to spreadsheet string conversion that's causing the problem because i don't have such \0D and \0A problem with keys without the conversion.
    How do i solve this?

    The OD and OA are the carriage return and line feed and yes the functona always appends these characters at the end of each line. Probably because this function is normally used to create files that a spreadsheet can read. There are several ways to remove the extra characters. Shown below is the string reversed and the String Subset function uses an offset of two. The output of that is reversed to get a string without the CR and LF. Also shown is getting the string length, subtracting 2 and wiring that to the length input of the String Subset function.
    Message Edited by Dennis Knutson on 07-26-2007 10:57 PM
    Attachments:
    Strip Last Two Characters.PNG ‏6 KB

  • Array To Spreadsheet String, Empty Delimiter

    The Array To Spreadsheet String function does not accept an empty Delimiter, it uses the Tab character in such case.
    The same is true for the Spreadsheet String To Array function (but of course this function cannot work without a Delimiter).
    I would appreciate one of the following options:
    to allow an empty separator for both functions (for Array To Spreadsheet String this can easily work obviously; for Spreadsheet String To Array you might see an empty string delimiter between each two adjacent characters similar to the Search and Replace String function with an empty search string);
    to document that behaviour properly;
    I would prefer the first option espacially for the Array To Spreadsheet String function. What do you think?

    Hi aschipfl,
    some thoughts about your suggestion:
    - When you want to suggest improvements to LabVIEW you should post in the Idea Exchange.
    - NI will not change the behaviour of functions existing for a long time…
    - NI will probably update the LabVIEW help for that function…
    - a spreadsheet string needs some kind of delimiter, what's the purpose of creating a spreadsheet string without them?
    When you really need a "Array to Spreadsheet String" without delimiters you could take this approach:

  • Write array to spreadsheet string

    Hi,
    I have 3 numeric arrays and 1 string array.  I am try to use the function write array to spreadsheet string.  What is the easy way to do this, since I have both numeric and string, I can't create a 2d array directly?
    Yik
    Kudos and Accepted as Solution are welcome!
    Solved!
    Go to Solution.

    It depends how you want the file to store the data.
    Attached is an example of two methods mentionned above.  You can change the formatting so that you have the data on the same line or different lines.
    There are many solutions depending on exactly what you want to accomplish.
    --- didn't expect to see so many replies so quickly ---
    Most people recommend converting the numeric array to string array first.  I offer an alternative   or a choice of both.. 
    Attachments:
    exampleOfWriteDiffArrayToSprdsht.png ‏28 KB

  • Array To Spreadsheet String -- Convert EOL Option

    The Array To Spreadsheet String and Spreadsheet String To Array functions should provide an option for (not) converting EOL (end-of-line) to platform-dependent ones. I am thinking of something similar to the Write/Read Text File options where you can place a checkbox in the context menu "Convert EOL". As per default such checkbox need to be checked for compatibility reasons.
    Possibly another option/checkbox for not appending the final EOL would be nice, maybe "Final EOL" checked per default as well.

    Hi aschipfl,
    some thoughts about your suggestion:
    - When you want to suggest improvements to LabVIEW you should post in the Idea Exchange.
    - NI will not change the behaviour of functions existing for a long time…
    - NI will probably update the LabVIEW help for that function…
    - a spreadsheet string needs some kind of delimiter, what's the purpose of creating a spreadsheet string without them?
    When you really need a "Array to Spreadsheet String" without delimiters you could take this approach:

  • Trouble with arrays

    Hi!
    I have to write a program where you enter a name of a person and his points in a game using arrays. The program stops when you enter -99
    Then the output should be like this
    Person 1 45
    Person 2 89
    Person 30 X
    We have just begun with arrays and i am not so good at it, i don't know what to enter in the brackets []. Can somebody help me? It has a lot of errors
    Here is my program:
    public class GradeArray {
         public static void main(String args[]) {
         String NameArray[] = new String [ 30 ];
         String NumberString;
         int NumberArray[] = new int [ 30 ];
         int ControlExit = 0;
         String output = "Name\t\tPoints\n";
         while (ControlExit == 0) { // start while
         NameArray[] = JOptionPane.showInputDialog(
    null, "Enter the name of the person");
         NumberString = JOptionPane.showInputDialog(
         null, "Enter "+NameArray[]+"'s points(0-100) Enter -99 toExit");
         NumberArray[] = Integer.parseInt(NumberString);
         if (NumberArray[] == -99)
         ControlExit = 1;
         } // end while
         for (int Control = 1; Control <= NumberArray.length; Control++)
         output += NameArray[] + "\t\t" + NumberArray[] + "\n";     
              JTextArea outputArea = new JTextArea();
              outputArea.setText( output );
    JOptionPane.showMessageDialog(null,
    outputArea);
    System.exit( 0 );

    ok, i understand it better but my modified program has still errors
    import javax.swing.*;
    public class GradeArray2 {
    public static void main(String args[]) {
    String NameArray[] = new String [ 30 ];
    String NumberString;
    int Number;
    int NumberArray[] = new int [ 30 ];
    int ControlExit = 0;
    String output = "Name\t\tGrade\n";
    while (ControlExit == 0) { // start while
    Name = JOptionPane.showInputDialog(
    null, "Enter the name of the person");
    Name = NameArray[Name];
    NumberString = JOptionPane.showInputDialog(
    null, "Enter "+NameArray+"'s points(0-100) Enter -99 to Exit");
    Number = Integer.parseInt(NumberString);
    NumberArray[Number] = Number;
    if (NumberArray[Number] == -99)
    ControlExit = 1;
    } // end while
    for (int Control = 1; Control <= NumberArray.length; Control++)
    output += NameArray[Name] + "\t\t" + NumberArray[Number] + "\n";
    JTextArea outputArea = new JTextArea();
    outputArea.setText( output );
    JOptionPane.showMessageDialog(null,
    outputArea);
    System.exit( 0 );
    [\CODE]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 3d array to spreadsheet string

    I need a spreadsheet string eliminating all rows [x, 0, 0].
    Solved!
    Go to Solution.
    Attachments:
    test.vi ‏14 KB

    Try changing it into a 2D array instead.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    test_BD.png ‏26 KB

  • Trouble with Arrays of Menus and Menu Items

    Okay the short story is I am designing a GUI for an application, it has a lot of menus, and a lot of menu items per menu.
    I thought like in normal Java I could simply make an array of Menus and several arrays of menu items. My problem is that it compiles fine, but spews tons of exceptions. I am using Netbeans as my IDE.
    Here is a sample of my code. Its not the whole thing, but its the part that I suspect has problems since it worked before I switched to doing them as arrays.
    Menu [] menus = new Menu [11];
    menus[0].setText("File");
    MenuItem [] file = new MenuItem [8]; //FILE MENU DEFINITIONS
    file[2].setText("Open"); //open
    file[2].setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent arg0) {
    FileChooser fc = new FileChooser();
    File file =fc.showOpenDialog(primaryStage);
    // file[2].setAccelerator(null);
    menus[0].getItems().addAll(file);
    MenuBar menubar = MenuBarBuilder.create()
    .build();
    menubar.getMenus().addAll(menus);
    VBox vbox1 = VBoxBuilder.create()
    .children(menubar,scrollPane1,btn)
    .build();
    ap.getChildren().addAll(vbox1);
    Anyways the stuff compiles just fine no errors. But Netbeans spews exceptions like a guy who chugged a bottle of ipecac and the programs bombs.
    Here is some of them.
    Exception in Application start method
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at com.javafx.main.Main.launchApp(Main.java:642)
         at com.javafx.main.Main.main(Main.java:805)
    Caused by: java.lang.RuntimeException: Exception in Application start method
         at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
         at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
         at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.NullPointerException
         at javafxapplication2.JavaFXApplication2.start(JavaFXApplication2.java:37)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
         at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
         ... 1 more
    Java Result: 1
    I am not really sure what to do. I would like some recommendations.
    If possible I would still like to use arrays of Menus and Menu Items, but if its not possible, I would like to know and understand why not.

    I apologize if I don't fully understand. I am still kind new to this. But It was my understanding that .jar file was made after compiling not before. I am not really sure what you mean by class path. Could you give an example. Again this code worked wonderfully before I used arrays. If I comment it out and replace it with dummy code like this it compiles and runs just fine.
    MenuItem open = new MenuItem("TEST");
    Menu debug =new Menu("DEBUG");
    debug.getItems().add(open);
    MenuBar menubar = MenuBarBuilder.create()
    .build();
    menubar.getMenus().addAll(debug);
    StackPane rootz = new StackPane();
    final TextArea textArea =TextAreaBuilder.create()
    .prefWidth(600)
    .prefHeight(400)
    .wrapText(true)
    .build();
    ScrollPane scrollPane1 = new ScrollPane();
    scrollPane1.getStyleClass().add("no-border-scroll-pane");
    scrollPane1.setMinSize(400, 400);
    scrollPane1.setContent(textArea);
    VBox vbox1 = VBoxBuilder.create()
    .children(menubar,scrollPane1,btn)
    .build();
    ap.getChildren().addAll(vbox1);
    btn.setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent arg0) {
    System.out.println("Hello World!");
    FileChooser fc = new FileChooser();
    File file =fc.showOpenDialog(primaryStage);
    Scene scene = new Scene(ap, 760, 500);
    primaryStage.setTitle("Hello World!");
    primaryStage.setScene(scene);
    primaryStage.show();
    * The main() method is ignored in correctly deployed JavaFX application.
    * main() serves only as fallback in case the application can not be
    * launched through deployment artifacts, e.g., in IDEs with limited FX
    * support. NetBeans ignores main().
    * @param args the command line arguments
    public static void main(String[] args) {
    launch(args);
    }

  • Why do I have so much trouble with arrays

    using the following query:
    <cfloop index="loopCompanyNumberSet01Array" from="1"
    to="#arrayLen(companyNumberSet01Array)#" step="1">
    <cfquery name="qrySeriesList" datasource="erpdb01">
    SELECT DISTINCT Left(t_item,2)
    FROM
    dbo.ttiitm001#companyNumberSet01Array[loopCompanyNumberSet01Array]#
    ORDER BY 1
    </cfquery>
    </cfloop>
    I can use cfdump and see that I am getting the results I
    want, but I want to now take them and put them into an array (or
    list) so I can use them for another set of querires
    I tried:
    <cfset seriesArray=arrayNew(1)>
    <cfloop index="getSeriesList" from="1"
    to="#arrayLen(qrySeriesList)#" step="1">
    <cfloop query="#qrySeriesList[getSeriesList]#">
    <cfset seriesArray[currentRow][1]=1>
    </cfloop>
    </cfloop>
    but get error:
    Object of type class coldfusion.sql.QueryTable cannot be used
    as an array

    jkgiven wrote:
    > using the following query:
    > <cfloop index="loopCompanyNumberSet01Array" from="1"
    > to="#arrayLen(companyNumberSet01Array)#" step="1">
    > <cfquery name="qrySeriesList"
    datasource="erpdb01">
    > SELECT DISTINCT Left(t_item,2)
    > FROM
    dbo.ttiitm001#companyNumberSet01Array[loopCompanyNumberSet01Array]#
    > ORDER BY 1
    > </cfquery>
    > </cfloop>
    >
    > I can use cfdump and see that I am getting the results I
    want, but I want to
    > now take them and put them into an array (or list) so I
    can use them for
    > another set of querires
    >
    > I tried:
    > <cfset seriesArray=arrayNew(1)>
    > <cfloop index="getSeriesList" from="1"
    to="#arrayLen(qrySeriesList)#" step="1">
    > <cfloop query="#qrySeriesList[getSeriesList]#">
    > <cfset seriesArray[currentRow][1]=1>
    > </cfloop>
    > </cfloop>
    >
    > but get error:
    > Object of type class coldfusion.sql.QueryTable cannot be
    used as an array
    >
    1) just use qrySeriesList.recordcount instead of your
    arraylen(qrySeriesList)
    2) even better: why use cfloop over query rows when
    <cfoutput
    query="qrySeriesList"> does just that?
    ... oh, i see what you are trying to do now...
    ok, you will have to move the array populating code into your
    first
    cfloop, after the cfquery in it:
    > <cfloop index="loopCompanyNumberSet01Array" from="1"
    > to="#arrayLen(companyNumberSet01Array)#" step="1">
    > <cfquery name="qrySeriesList"
    datasource="erpdb01">
    > SELECT DISTINCT Left(t_item,2)
    > FROM
    dbo.ttiitm001#companyNumberSet01Array[loopCompanyNumberSet01Array]#
    > ORDER BY 1
    > </cfquery>
    move it into here
    > </cfloop>
    3) now, for your array populating script:
    a)
    > <cfset seriesArray=arrayNew(1)>
    that declares a one-dimensional array
    > <cfset seriesArray[currentRow][1]=1>
    but here, i believe, you are populating it as a
    two-dimensional array...
    b)
    > <cfloop index="getSeriesList" from="1"
    to="#arrayLen(qrySeriesList)#" step="1">
    instead of this loop, just use
    <cfoutput query="qrySeriesList">...</cfoutput>
    c)
    > <cfloop query="#qrySeriesList[getSeriesList]#">
    is this the line cf is complaining about?
    you never set your qrySelectList to be distinct queries in
    your first
    loop. with its every iteration that loop just creates a new
    qrySelectSeries, replacing the one created in the previous
    iteration.
    but once you move your array-setting code into the loop, you
    will no
    longer need this loop at all.
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Having trouble with array formula in Numbers

    I should start right away by stating that I am very new to using numbers and array formulas, so potentially I am missing something very basic.
    But, I am having trouble creating a progessive array formula that will allow me to charge users of a system different rates depending on their volume of money going through the system. For instance for their first 10,000 it will be chanrged at 2%, but between 10,000 and 150,000 it will be 1.5%, etc.
    The formula I am using now is =SUM(IF(IF,B15>=B8:B11,B8:B11-B7:B10,B15-B7:B10+.001)>0,IF(B15>=B8:B11,B8:B11-B 7:B10,B15-B7:B10+.001),0)*D7:D10).
    Where B15 is the total money; B7:B10 are the values where a new percentage rate starts, and B11 is just a maximum value; and D7:D10 is the list of corresponding percentages.
    Thanks in advance!
    Kyla

    HI Kyla,
    Following up on Jerry's suggestion, here's an example that may do what you're looking for.
    Main is a table containing several examples of possible amounts and the related charges. Note that for ease of seeing the results of calculations, each amount is either at or 100 above a threshold value at which rates change.
    The Rates table lists the threshold values in column A, the rate charged for amounts from that value to the next threshold value in column B, and the total amount charged for amounts up to the that threshold in column C.
    For example, an amount of one million one hundred (in whatever currency unit is being used) would be charged 11,675 on the first one million, and 0.75 on the one hundred exceeding that threshold, for the total shown in Main::C10.
    Formulas:
    Rates::C2:  (entered value) 0
    Rates::C3, and filled down: =C2+(A3-A2)*B2
    Main::C2, and filled down: =LOOKUP(B2,Rates :: A,Rates :: C)+(B2-LOOKUP(B2,Rates :: A,Rates :: A))*LOOKUP(B2,Rates :: A,Rates :: B)
    Each of the three LOOKUP functions will find the largest amount in Rates, column A that is less than or equal to the amount in B2 (of Main, the table containing the formula), and return the amount from the same row of Rates and the specified column.
    The first LOOKUP returns the amount due on the part of of the amount in Main::B2 up to the highest threshold amount reached, the second returns that threshold amount, which is subtracted from the amount in Main::B2 to determine the 'marginal amount', which is then multiplied by the rate, returned by the third LOOKUP function. That result is added to the amount returned by the first LOOKUP, and the result placed in Man::C2.
    Regards,
    Barry

  • Converting from spreadshet string to array and then back to spreadsheet string

    My questions is; why is the Spreadsheet string to array function creating more data than the original string had when you change the array back into a spreadsheet string. Im trying to analyze a comma delimited file using array functions since my column and row size is constant, but my data varies. Thus my reason for not using string parsing functions which would get more involved and difficult. So, however, after i convert to a 2D array of data from the comma delimited file I read from, and then I convert back to string using the Array to Spreadsheet String, I get added columns to the file, which prevents another program from receiving these files. Also, the data which I am reading is not all contiguous, it has gaps in some places for empty data. Looking at the file compared to the original after it has gone from string to array and then back to string again, looks almost identical except for the file size which got larger by 400 bytes and where the original file has empty spaces, the new file has a lot of commas added. Any idea?
    Charles

    The result you get is normal when the spreadsheet string contains rows of uneven length. Since the array rows have the same number of elements, nil values are added during the coonversion. And of course, the back to string conversion keep those added values in the string, with the associated commas.
    example : 3 x 3 array
    1,2,3
    4
    5,6,7
    is converted into
    1 2 3
    4 0 0
    5 6 7
    then back to
    1,2,3
    4,0,0
    5,6,7
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

Maybe you are looking for

  • Printing a PDF file from Chrome and Firefox - Image missing

    I created about 20 marketing sheets for work using the same default settings and a template. They contain several inserted images of drawings and floor plans on each sheet (saved individually). When I try to print a couple of different files directly

  • Input screen feild to the standard screen.

    hi sap masters, i really appreciate the help that which you provide. i have standard sap screen where in i need to add my custum screen input field as date type syst-datum. i am using a badi where am able to add any number of fields however in screen

  • TTYA Input and Output

    Hi All, I am new to this forum as well as new to SUN. I tried to boot a Sun Blade 100. The message that appears on the screen is Keyboard not found. use ttya Input and Output. I have only a normal MS Keyboard which cannot be connected to SUN. Do we n

  • BT vision+ versus youview+

    Over the last two months my vision+ box has gone into standby  on at least 12 occasions twice during recordings. I wonder if I were to buy one of the youview boxes for sale on ebay could I use this in place of the vision box ( which is not a good pie

  • JDBC Receiver INSET & UPDATE

    Hi All: How can we do INSERT and UPDATE in tables from XI. Like I have on JDBC receiver MT.(with one action field) Now if later I need to do INSERT or UPDATE how can I achive UPDATE at that time. Can some one explain me with concrete concepts or exam