Question on saving to different worksheets on excel.

How can I save data as I loop through a program, and save the data generated in different worksheets on one excel file, without using activex?

You have two other choices that do not use ActiveX.
1. If you write continuous data that exceeds the maximum number of rows in Excel, you can still read the data using an Excel macro. Using the ReadLine method, you can parse the data into cells and skip to the next worksheet when the row limit is reached or using any token that you want (ie. blank line).
2. If you have Excel 2000 or later, writing your data as an XML file will allow you to format the data into worksheets. This will increase the file size dramatically. To do this you have to write the required header and then maintain the proper heirarchy of Workbook, Worksheet, Table, Row, Cell and Data. Save a simple data file as XML to see the file format.
Michael Munroe, ABCDEF
Certified LabVIEW Developer, MCP
Find and fix bad VI Properties with Property Inspector

Similar Messages

  • How to compare data between two worksheet in Excel for applescript

    Hi All,
    How to compare the data from two different worksheet in Excel and set the value into one worksheet according to the same name? Here is the example. Worksheet 1 & 2 current we have, the final worksheet is the result we want and the value can be input in worksheet 1. Much appreciate if you can help on it.
    Worksheet 1:
    Name          Number
    Leo                 25
    Jame               55
    Leo                 30
    Jame               60
    Tim                 44
    Tomas             77
    Lyne                35
    Tonny              66
    Jame               22
    Game              88
    Worksheet  2:
    Name          Number  2
    Leo                60
    Jame             150
    Tim                66
    Tomas            88
    Lyne               55
    Tonny            99
    Game             111
    Rusult in Worksheet 1
    Name          Number        Total Number per name in Worksheet 1         Number 2 in Worksheet 2
    Leo                 25                          55                                                        60
    Jame               55                         137                                                       150
    Leo                 30                           55                                                        60
    Jame               60                         137                                                       150
    Tim                 44                          44                                                         66
    Tomas             77                          77                                                        88
    Lyne                35                          35                                                        55
    Tonny              66                          66                                                        99
    Jame               22                         137                                                       150
    Game              88                          88                                                        111

    I'd probably use a database for this, if there's any quantity of data involved here.  Import from Excel into {SQLite, MySQL, PostgreSQL, FileMaker, maybe Core Data}, or pick your preferred key-value store, keep your data in the database, then export or (via ODBC/JDBC) then access live database data from within the spreadsheets.
    Alternatively and if you're looking at small quantities of data (say, less than 10,000 entries, or less than a thousand depending on the language), then just use whatever passes for a key-value store in your preferred scripting language {Python, bash, Lua, or maybe php, AppleScript or Java} and use that.  Export Excel to CSV {gag} or XML, then load that into Python and process as needed, then write out CSV {gag} or XML.
    AppleScript is a scripting language for GUI applications, and also useful for processing events.  If you're not doing that sort of stuff, then there can be other choices, and other choices can often have extensive frameworks and libraries for common tasks.
    Sooner or later, most everybody runs into a wall when using a spreadsheet...  Various folks have encountered those limits and have migrated from spreadsheets to FileMaker databases, and now use a database as the central store for their operations — and that's the other issue that can arise with spreadsheets... Where's the canonical data?

  • Hi Everyone,  I am using iPhone5, my question in how to display name and contact number both stored for incoming and outgoing calls? If I have saved five different numbers with a same name, how do I recognise that from which number caller is calling?

    Hi Everyone,  I am using iPhone5, my question in how to display name and contact number both stored for incoming and outgoing calls? If I have saved five different numbers with a same name, how do I recognise that from which number caller is calling?

    I have friends all over Europe, does it matter what number they use to call me? Nope! All incoming calls are free for me.
    The only time you ever have to worry about which number is if you get charged for incoming domestic/international calls.
    You can tag their number (work/home/iphone) and that may show on the CallerID accordingly.
    It should show, John Doe
    underneath,    work/home/mobile
    For example:
    http://shawnblanc.net/images/img-0009-1.png

  • General Advice and Question on Saving Book Files

    I am still relatively new to FrameMaker. I attended a one on one course 12 months ago for two days. When I attended this course I was totally oblivious to the features of FM, it was totally foreign software. I had looked through the User Guide and as part of the course received Classroom in a Book. I have not spent a lot of time on FM in the last 12 months as I still have to produce manuals in the old format. The changeover is a huge project.
    I have searched this forum many times and found the answers I have needed to many of my questions and learnt so much that I had not fully understood.
    I would just like to confirm now with the users of this forum that I am going about my project in converting to FrameMaker in the right way and I have a question on saving books etc.
    I have Operator and Service manuals for four machines (with variations between each machine and then variations between each of those basic models). Parts of the Operator and Service manuals are interchangeable.
    I want to be able to single source my material and I am setting up an Excel spreadsheet which will breakdown each section of both manuals. Once completed when a machine is ordered the Excel spreadsheet will produce the details of the files needed to complete a book (manual). There will still be work needed on the book files before the manual can be produced.
    My files are double sided with each Chapter starting on the right hand page and I am using variables and conditional text. The manuals contain columns, graphics, tables etc.
    I have done test runs and have managed to accomplish the layout in PDF that I want for the final manuals which will be printed. I am only working on four machines at this stage, once this is set up others will be added or I may have to set up another lot of single source files.
    Am I on the right track?
    My specific question is that currently I use master files for each machine which are updated as needed. These files are then saved to another folder and identified by a Serial Number and Customer. The serialised files are then saved to PDF. I would like to continue this process as in the future the manuals for that specific machine may need to be revised (i.e. Rev. 0 to Rev. 1 and so on).
    So basically I have all my single source files from which I produce a book file and save it to an appropriate folder which identifies its Serial Number and Customer. I don’t know if I have missed something very simple but I want these serialised books to remain as is, I do not want them updated when I make a change to my single source documents. I want to be able to produce my manuals for any number of machines from my single source without changing the book files that have already produced a manual. Is this possible?
    I am using FrameMaker 7.2 b144.
    I hope this posting provides a clear view of what I am trying to achieve.
    Many thanks in advance for any advice and answers that are provided.
    PS This is the first time I have ever posted to any forums.

    It sounds like you want to be able to open the book files and print without updating...
    This isn't the case. Each book will need to be updated before output.
    The reason is that your pagecount (and thus any toc, index, and xref's) will be different in each book and thus will need to be  updated.
    The books will still need a opening and updating prior to output, but you could easily (cheaply) script that process so that you could batch output the books.
    -Matt
    Matt Sullivan
    director of training
    roundpeg, inc.
    http://blogs.roundpeg.com
    http://twitter.com/mattrsullivan

  • Applescript - coping columns in a new worksheet in Excel 2004

    Dear all,
    I’m new to Applescript and would appreciate a help on the following:
    I'm trying to copy in different worksheets of a new Excel 2004 workbook(New _WB.xls) different columns (blocs of text + data) in the same worksheet (lest’s call it file1 of a workbook named Old_WB.xls). The columns are separated by 2 empty rows.
    I've searched solutions online with no luck.  Can anyone show me how to code the solution of this problem in Applescript?
    Thanks in advance.
    Ghan

    well, then you want something like so:
    tell application "Microsoft Excel"
              open alias "path:to:workbook"
              set x to value of used range of worksheet 1 of workbook 1
    end tell
    set block to {}
    set idx to 1
    repeat with thisLine in x
              if thisLine as list = {"*", "", ""} or thisLine as list = {"", "", ""} then
      -- empty line means end of block; make sure some block has been collected then process
                        if block is not {} then
                                  set rowCount to count of block
                                  tell application "Microsoft Excel"
                                            tell workbook 1
                                                      set nws to make new worksheet at end
                                                      tell nws
                                                                set name to "file" & idx
                                                                set value of range ("A1:C" & rowCount) to block
                                                      end tell
                                            end tell
                                  end tell
                                  set idx to idx + 1
                                  set block to {}
                        end if
                        if thisLine as list = {"*", "", ""} then
      --all done
                                  exit repeat
                        end if
              else
                        copy thisLine to end of block
              end if
    end repeat
    I've used a "*" character o signify the end of data - you'll need to change that to what you use in lines 9 and 25. Be careful that there's nothing else written outside of the data range because the used range command will pick up on it and goof things up.

  • How can you save data to a spreadsheet and use different worksheets in the spreadsheet?

    I am trying to save data to a spreadsheet.
    Each set of test data needs to be saved under a different worksheet. Is this possible and how can I do it?

    As the example that Dennis pointed out, this can be done using activeX. In addition to that example I have another that demonstrates how to create a new workbook with multiple worksheets and save data to each of them. I hope that between the two you can get an idea of what to do.
    Brian
    Attachments:
    xlexample.vi ‏66 KB

  • Indentifying different fonts in Excel programatically

    I have text data with different font in Excel sheet now I want that  program should identify that font and apply automatically to that data. any one help plz ......
    thanks

    You can use the
    Font property of the Range class, for example:
    Sub CheckFont()
    Range("A1").Select
    ' Determine if the font name for selected cell is Arial.
    If Range("A1").Font.Name = "Arial" Then
    MsgBox "The font name for this cell is 'Arial'"
    Else
    MsgBox "The font name for this cell is not 'Arial'"
    End If
    End Sub
    Also you may find the
    Font property of the Characters class helpful, for example:
    With Worksheets("Sheet1").Range("B1")
    .Value = "New Title"
    .Characters(5, 5).Font.Bold = True
    End With

  • LabVIEW V'sI containing TestStand API saved on different Windows versions

    Hi.
    I have a question regarding saving and loading of LabVIEW VI's that contains calls to the TestStand API in different versions of Windows:
    Can it be true that if I create such a VI in e.g. 64 bit Windows 7 and then load it in 32 bit Windows 7 or XP with the exact same versions of LabVIEW and TestStand, the VI will need to be recompiled?
    I am currently using LabVIEW 2012 SP1 f9 and TestStand 2012 SP1 f1.
    Best regards
    Jens Christian Andersen.
    Best regards
    Jens Christian Andersen.
    CLA, CTA

    Hi,
    If the labview version is same then it need not be re compiled.
    It will work with different versions of Windows (for both bitness 64\32 OS)
    Ravi

  • Is it possible to have your music and videos saved on different external drives and use the same iTunes library?

    Is it possible to have your music and videos saved on different external drives and use the same iTunes library?
    I am running out of space on my external hard drive and would like to split the movies and music between two external drives while using the same iTunes library is this possible.
    My library is stored on the external drive all of my music etc is stored.

    Yes.

  • Break Report group wise in different sheets in excel

    Hi,
    Can we split the xml report into different sheets in excel depending on the xml node hierarchy ? I don't want to mail the report.
    Regards,

    The blog http://blogs.oracle.com/xmlpublisher/2010/03/multisheet_excel_output.html might give you some idea.

  • MULTIPLE WORKSHEETS PER EXCEL WORKBOOK USING XSLT

    Hi everybody,
    My query is on how multiple worksheets per excel file can be created using xslt programming.
    From my report program i call the xslt transformation passing an internal table. Based on the changes in the values of a particular field in the table, multiple worksheets are to be created in a single excel file.
    A snippet of the code ive generated is displayed below .But i get the error saying its unable to open the file. I need to know where exactly to place the <for-each select> and <worksheet> statements in order to successfully implement the solution. Would greatly appreciate any help offerred in this direction. Thanks
    <xsl:template match="/">
    <workbook>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
          </ExcelWorkbook>
            <xsl:apply-templates />
    </Workbook>
    </xsl:template>
    <xsl:template match="asx:values">
    <xsl:for-each select="ROWS/ZWORKSHEET">
    <Worksheet ss:Name="FIRSTCOL">
      <Table ss:ExpandedColumnCount="10" x:FullColumns="1"
       x:FullRows="1" ss:DefaultColumnWidth="66" ss:DefaultRowHeight="14.25">
        <Row xmlns="urn:schemas-microsoft-com:office:spreadsheet"
             xmlns:o="urn:schemas-microsoft-com:office:office"
             xmlns:x="urn:schemas-microsoft-com:office:excel"
             xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
             xmlns:html="http://www.w3.org/TR/REC-html40">
          <Cell ss:StyleID="s23"><Data ss:Type="String">SAP Material Number</Data></Cell>
          <Cell ss:StyleID="s23"><Data ss:Type="String">CLP</Data></Cell>
        </Row>
      </Table>
      </Worksheet>
    </xsl:for-each>
    </xsl:template>
    </xsl:transform>

    If the Sales Org values are static, you shold be able to create a variant.  Don't know off what the variable name is off the top of my head, but there should be a variable delivered as part of business content that obtains the current month - look at the 0CALMONTH variables. (May be something like 0CMONTH ?)If you don't see it, maybe that variable activated yet.
    Does just one person run this workbook or are many people?
    If you schedule the query with reporting agent, you should be able to warmup (load the results)to the OLAP cache so when the user runs the querys later, they'll run very quickly, retrieving the data from the OLAP cache.  BEx Broadcaster is a good option too if the criteria for the queries are all known upfront.
    Message was edited by: Pizzaman
    Fogo to ask - are you using hierarchies in the query?  They can have a lot of perfromance impacts on the front end interms of rendering them in Excel.  There are some Front End patches that speed this up quite a bit.

  • Hi, I have answered no to the question about saving password for one spesific site. I have changed my mind and would like Firefox to save the password. How do I reactivate the password saver for one spesific site?

    Hi, I have answered no to the question about saving password for one spesific site. I have changed my mind and would like Firefox to save the password. How do I reactivate the password saver for one spesific site?

    Check exception list of your Firefox password Manager and check if your site is there or not?
    * http://kb.mozillazine.org/User_name_and_password_not_remembered#Password_Manager_settings

  • I am trying to download a movie in iTunes and I was asked two security questions. They are different form the questions I chose and whenever I exit and try again, I see that the questions change every time. How can I reset the questions?

    I am trying to download a movie in iTunes and I was asked two security questions. They are different form the questions I chose and whenever I exit and try again, I see that the questions change every time. How can I reset the questions?

    From a Kappy  post
    The Best Alternatives for Security Questions and Rescue Mail
    1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
    2.  Call Apple Support in your country: Customer Service: Contact Apple support.
    3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • Populate Result of query in Different worksheets of One Workbook in Excel.

    I want to get output of different queries to be populated in Different Sheets of a workbook of Excel in Unix/Linux Environment.

    Here is an example perl script using the Spreadsheet::WriteExcel CPAN module that might help:
    ===#!/usr/bin/perl
    use strict;
    use DBI;
    use Spreadsheet::WriteExcel;
    my ($toc,$data_sheet,$f,%data,$workbook) = ();
    my ($workbook_filename) = "mytest.xls";
    $workbook = Spreadsheet::WriteExcel->new($workbook_filename);
    sub build_excel_workbook {
      $workbook->compatibility_mode();
      $f = \%{$data{excel_format}};
      $$f{bold} = $workbook->add_format();
      $$f{bold}->set_bold();
      $$f{right_align} = $workbook->add_format();
      $$f{right_align}->set_align("right");
      $toc = \%{$data{excel_table_of_contents}};
      $$toc{tab} = $workbook->add_worksheet("Table of Contents");
      $$toc{tab}->freeze_panes(1,0);
      $$toc{tab}->set_column(0,1,20);
      $$toc{tab}->write(0,0,"WorkSheet Name",$$f{bold});
      $$toc{tab}->write(0,1,"Comments",$$f{bold});
      $data_sheet = \%{$data{excel_data_sheet}};
      $$data_sheet{tab} = $workbook->add_worksheet("EMP table");
      $$data_sheet{current_row} = 0;
      $$toc{tab}->write(1,0,"EMP table");
      $$toc{tab}->write(1,1,"Example WorkSheet containing EMP sample data");
    build_excel_workbook();
    my $db = DBI->connect( "dbi:Oracle:Local", "scott", "tiger" )
        || die( $DBI::errstr . "\n" );
    $db->{AutoCommit}    = 0;
    $db->{RaiseError}    = 1;
    $db->{ora_check_sql} = 0;
    $db->{RowCacheSize}  = 16;
    my $SEL = "SELECT * FROM EMP";
    my $sth = $db->prepare($SEL);
    $sth->execute();
    while ( my @row = $sth->fetchrow_array() ) {
        for (my $i = 0; $i <= $#row; $i++) {
            $$data_sheet{tab}->write($$data_sheet{current_row},$i,$row[$i]);
        $$data_sheet{current_row}++;
    END { $db->disconnect if defined($db); }
    #end_script===
    Best Regards,
    Bryan Wood
    Edited by: BryanWood on Jan 26, 2012 4:07 PM
    Edited by: BryanWood on Jan 26, 2012 4:10 PM

  • Is it possible to load multiple .xlsx files into a SQL Server Table using SSIS and a Foreach Loop Container when each Excel spreadsheet is comprised of two different worksheets

    So we have an Invoice .xlsx File from a 3rd party vendor. It contains two worksheets..."Enrolled" and "Engaged". The data and data columns in each worksheet is different. Is it possible to loop through multiple .xlsx files using SSIS
    and a Foreach Loop Container for each spreadsheet, and then another Foreach Loop Container to control each worksheet, and pump the Excel data into a SQL Server Table first for "Enrolled" and then for "Engaged"? How can I control the Foreach
    Loop Container in SSIS to process ONLY the "Enrolled" worksheet first? And then the "Engaged" worksheet next?
    I know I have multiples out here and I apologize for that...but right now it seems as though I take three steps forward and then two back.
    Any help would be GREATLY appreciated!
    Thanks in advance!

    If the structure of the Excel sheets does not change from file to file then you can by having one ForEach Loop processing always the "Enrolled" sheet and another always the "Engaged" this is doable because the Excel OLEDB connector allows
    to pick individual sheets, it is problematic therefore when sheet names themselves change.
    MSDN has an example: https://msdn.microsoft.com/en-ca/library/ms345182.aspx
    Arthur
    MyBlog
    Twitter

Maybe you are looking for

  • PDF driver

    Oracle Reports 10g R1. Is there something special about the oracle pdf driver? For some reason, any report generated in pdf format from oracle reports is not able to be indexed by Oracle Text. All other pdfs are indexed just fine. Anybody else notice

  • Will I still be able to use FCP to finish current project if I purchase the 40% off switch to cloud?

    Apologies if this is a silly question, but I haven't been able to find what happens to the use of FCP when using adobe's switch dicsount to subscribe to cloud. I have a project I'm currently working on in FCP but want to purchase a subscription to cl

  • Discoverer client screen hangs trying to load the applet

    ...or so I think. We have a portal server running Discoverer 10.1.2.1. When using IE 6, the developers can get to the login screen (we're using the default one) and after they hit GO the new client browser window comes up but then just sits there bla

  • Problem with LSMW for tcode BP

    HI I am trying to update some data from flat file to the CRM using lsmw.every step is complted and the batch in put is completed sucess fully but after seeing the BP i cannot find the data

  • Issue on Creating RFx in Business Package

    Hi We are in to SRM 7.0 with the same version of Business Package. I am trying to create a RFx from Portal which in turn calls the webdynpro application (Strategic Purchasing->Strategic Sourcing->Create Documents->RFx) sap/bc/webdynpro/sapsrm/wda_l_f