Several Excel (xlsx) sheets and formatting

I currently have a project that I took over another developer. Part of the application displays data to a SQL Server 2008 database to an Excel file that includes three leaves or tabs, which are created in order, from left to right. I work for a problem which, once the spreadsheets Excel file, the first and the third opening "together." Next to the file name in the title bar, it is said [group] and the two leaves appear to be active. The problem is that if the user was, say, highlight the line 5 in sheet 3, rank 5 also gets highlighted in sheet 1. I've looked everywhere by each search string I can think of and can't find anything! I even tried to recreate a skeleton of the feature based on the CF documents and ran into the same problems. I understood some things on my own.

First, the Middle sheet is not at all affected. Second, once in Excel, if you select the Middle sheet, everything is fixed (of course, which is not an ideal solution for the end user). In the third place, if I create the spreadsheet with 'xmlformat' equal to 'false' and output as a "xls", this problem goes away, but the format should be "xlsx". Finally, I tried to add a line of code to set the sheet active back to the first time the third extra is generated. Does break the problem of reunification, but he defeated any line or sizing of column in the first sheet, and I can't get it back.  I can format anything in the first worksheet except the column width or row height.  I tried the spreadsheet of CF (SetColumnWidth) and POI functions.  Not more than anything.

My code is below. If anyone can help, I would be very grateful!

<cfscript>

  /* Format for data rows */
  dataFormat = StructNew();
  dataFormat.font="Arial";
  dataFormat.fontsize="10";
  dataFormat.italic="false";
  dataFormat.bold="false";
  dataFormat.alignment="left";
  dataFormat.textwrap="true";
  dataFormat.fgcolor="white";
  dataFormat.bottomborder="thin";
  dataFormat.bottombordercolor="black";
  dataFormat.topbordercolor="black";
  dataFormat.topborder="thin";
  dataFormat.leftborder="thin";
  dataFormat.leftbordercolor="black";
  dataFormat.rightborder="thin";
  dataFormat.rightbordercolor="black";
  dataFormat.locked = "true";
  //dataFormat.dataformat="@";

  spreadsheetVar= spreadSheetNew("New", "true");
  spreadsheetSetCellValue(spreadsheetVar, "123", 1, 1);
  spreadsheetSetCellValue(spreadsheetVar, "This is some medium length text.", 1, 2);
  spreadsheetSetCellValue(spreadsheetVar, "Here is longer text that will need to wrap once I am done.", 1, 3);
  spreadsheetSetCellValue(spreadsheetVar, "This is a very short amount of text.", 1, 4);
  spreadsheetSetCellValue(spreadsheetVar, "And here is the final column that needs to be formatted.", 1, 5);

  spreadsheetFormatRow(spreadsheetVar, dataFormat, 1);
  spreadsheetSetColumnWidth(spreadsheetVar, 1, 30);

  spreadsheetCreateSheet(spreadsheetVar,"A");
  spreadsheetSetActiveSheet(spreadsheetVar,"A");
  spreadsheetSetCellValue(spreadsheetVar, "Sheet A test", 1, 1);

  spreadsheetCreateSheet(spreadsheetVar,"B");
  spreadsheetSetActiveSheet(spreadsheetVar,"B");
  spreadsheetSetCellValue(spreadsheetVar, "Sheet B test", 1, 1);

  //This line gets rid of the grouping, but destroys the formatting for the sheet "New". To see the grouping, comment it out.
  spreadsheetSetActiveSheet(spreadsheetVar, "New");

</cfscript>
<cfspreadsheet action="write" filename="c:/mySpreadSheet.xlsx" name="spreadsheetVar" overwrite="true" >

I didn't know how to tag this as answered, but it is.  A user on another site I pointed in the direction of the setActiveSheet (0) POI function.  It worked perfectly to remove the link/grouping of the two sheets and keep the column of the first leaf widths.

Tags: ColdFusion

Similar Questions

  • problems with office 2010 excellent file transfer and documents word for os7 through a USB stick to vista with office 2003 operating system

    Download excel and word files from my laptop with os 7 and office 2010 on USB but when I transfer it to laptop office which has the os vista and office 2003, they all open with gobblygook

    The native formats for word (.docx) and excel (.xlsx) are not compatible with Office 2003.  You need to either save AS Office 97 - 2003, in 2010, or you can install the Office Compatibility on your Vista machine.

    Microsoft Office for Word, Excel, and PowerPoint File Formats Compatibility Pack
    http://www.Microsoft.com/en-US/Download/details.aspx?ID=3

  • Style sheets and applying to imported Word documents. (RHx5)

    I read an opinion about style sheets, import Word documents and formatting issues (regarding the import of predetermined styles/bullets/numbers and Word documents).  I also saw that someone was trying to create a css outside RH and has problems.  This brings me to a few questions.

    1. in the import of Word documents, creates HR a separate for each doc, css or y at - it an option to not have this happen during the execution of the import process?

    2. If I understand css, you must have a project, if you want all html pages look the same, correct?

    3. What do you do if you made the mistake of having several different css' out there, all making it appear funky?  Can you create a new project and import the documents without the css and apply a new css (created in the new project) to all html files?  Will be this help by correcting a lot of spacing, bullets and numbering of the problems?

    4. can I find the default css and modify it?

    I think I have a big problem on my hands.  I tried to make things easier for SMEs which have been assigned to write procedures by creating the formats predefined in Word.  After reading pages of PG, I sank into my chair.  I got in trouble, he said.  I tried to edit some pages in the html editor and seem to make them worse.  I tried to simplify the code a bit (with what knowledge I have currently in html, which is minimal).  I am lucky that I have only about 200 documents that could be affected.  Comments/suggestions are greatly appreciated.

    Rob

    1] when importing Word documents, HR does create a separate for each doc, css or y at - it an option to not have this happen during the execution of the import process?

    It's like that, no other choice.

    2. If I understand css, you must have a project, if you want all html pages look the same, correct?

    In the condition "If you want identical", you would have only a CSS, but you don't have to have them all identical. It's your call.

    3. What do you do if you made the mistake of having several different css' out there, all making it appear funky?  Can you create a new project and import the documents without the css and apply a new css (created in the new project) to all html files?  Will be this help by correcting a lot of spacing, bullets and numbering of the problems?

    It is not an error, but if you want to get out of this situation, you must do a clean up. The first step is to create a CSS that contains all your existing style names, note that I say the names. Each of your CSS files have a variety of styles, but we will make it easy for this explanation. We have H1, H2, P and P.Note (a class) while the other has an a H1, H2, P and P.Warning (a class). Now, let's say you have only two topics, CSS_1 and CSS_2. H1, H2, and P styles can be the same or different, but assuming they are different, you want to now, they are the same, so what you want is a CSS with H1, H2, P, P.Note and P.Warning. You could then apply that both subjects and all the content will be displayed as defined in CSS_3. Of course the real task is greater, but the principles are the same.

    The I should fix is to create a new CSS and copying in most of your CSS styles existing files. Then I look at others and copy in all models that are not already in. This gives you all the names of style, but with the appearance of false. Then you start working through the styles to get them right. It is not as bad as it sounds. I recommend using Top Style of http://www.bradsoft.com. There is a free version that opens only a CSS at the same time, but you can see what you do with it. Others can be opened in Notepad.

    4. can I find the default css and modify it?

    Yes.

    I think I have a big problem on my hands.  I tried to make things easier for SMEs which have been assigned to write procedures by creating the formats predefined in Word.  After reading pages of PG, I sank into my chair.  I got in trouble, he said.  I tried to edit some pages in the html editor and seem to make them worse.  I tried to simplify the code a bit (with what knowledge I have currently in html, which is minimal).  I am lucky that I have only about 200 documents that could be affected.  Comments/suggestions are greatly appreciated.

    Next time you need entry of the SME, the power for a model HR Word so that they all look the same. Their job is providing content for the styles are not relevant for them.

    Yes, you have a bit of work, but it's not too massive. I hope this helps.

    See www.grainge.org for creating tips and RoboHelp

  • View files without excel xlsx

    A friend sent me a xlsx file and I can't open it.  I have windows xp home edition, which has the worksheet instead of excel.  Can I convert xlsx files xlr.

    You can download/install the free Excel Viewer:

    Converters for Office files and viewers - http://office.microsoft.com/en-us/downloads/HA010449811033.aspx MS - MVP - Elephant Boy computers - Don ' t Panic!

  • Error in (IR) report to Excel (xlsx) plugin (Anton)?

    Version 4.1.1.00.23

    Hello

    I try this plugin (IR) report to Excel (xlsx) http://www.apex-plugin.com/oracle-apex-plugins/process-type-plugin/ir-report-to-excel-xlsx_74.html by Anton Scheffer and when the report opens in Excel, I get an error that Excel wants to fix.

    The report is an interactive report.

    The error is:

    <?xml version="1.0" encoding="UTF-8" standalone="true"?>
    -<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <logFileName>error058920_01.xml</logFileName>
    <summary>Errors were detected in file 'C:\Users\E20718\AppData\Local\Temp\Forecast.xlsx'</summary>
    -<removedRecords summary="Following is a list of removed records:">
    <removedRecord>Removed Records: Cell information from /xl/worksheets/sheet1.xml part</removedRecord>
    </removedRecords>
    </recoveryLog>
    
    

    Can anyone help solve this?

    Can what information I provide?

    Thank you

    Joe

    I check the forums of andPL/SQL SQL almost everyday, this forum less.

    But Tom's right. Because the plugin doesn't work in most cases your problem is very likely related data. So if you could share the xlsx file, or the files mentioned Tom that it would probably help solve the problem
    The demo of the plugin page, you can find an updated version, here , which fixes some problems. I'm not sure if solves your problem.

  • Exporting data to Excel discoverer - keep the format for numbers options

    Is it possible to keep the format options when you export an excel spreadsheet.

    I formatted numbers with 2 decimal places and using the 1000 separator, but in great numbers do not have the 1000 separator. For some reason any.

    Thank you

    Oddie

    Oddie-

    When we export out of our 10.1.2.3 Discoverer Plus the instance as a Microsoft Excel (.xls) workbook and open results with Excel 2007, we can see the format exactly as it is in the Scout report.

    When the user first opens the workbook, they see two worksheets - we the unformatted data, and contains macros formatting. At the top left, there is a warning from security - Macros have been disabled, with the Options button. By clicking on the Options button gives a choice to 'enable this content '. Once the user clicks the OK button, the Excel export will be formatted as the discoverer of report.

    -Tracy

  • R - SQUARE is caluclating hurt when I did the math in the Excel spread sheet

    Hi all

    Any help is appreciated

    I have a query that calculates the R_square for all 3 lines A

    When I do the calculation of request for the 3 first lines is the correct calculation

    Following lines set calculates wrong

    I checked the calculation using the formula Rsquare Excel spread sheet
    SELECT a.*,
           REGR_R2 (average, prof) OVER (ORDER BY rn
                                         ROWS BETWEEN CASE WHEN MOD (rn, 3) = 0
                                                                THEN 3
                                                           WHEN rn_desc = 1
                                                                THEN  MOD (rn, 3)
                                                           ELSE  0
                                                      END  PRECEDING
                                               AND CURRENT ROW) AS r_square 
    FROM   (select b.*,
                   row_number() over (order by b.a) rn,
                   row_number() over (order by b.a desc) rn_desc
            from   tableaa b
           ) a
    ORDER BY  a.a;
    1     A     BEG     END     PROF     AVERAGE     REGION     RN     RN_DESC     R_SQUARE     Excel Formula(
    2     1     0     0.1     159     159     1     1     14          
    3     2     0.1     0.2     159     168     1     2     13          
    4     3     0.2     0.3     179     159     1     3     12     0.25          0.25        =RSQ(E2:E4,D2:D4)
    5     4     0.1     0.2     250     300     1     4     11          
    6     5     0.2     0.3     320     250     1     5     10          
    7     6     0.3     0.4     250     380     1     6     9     0.164520715     0.627906977 ===RSQ(E5:E7,D5:D7)
    8     7     0.2     0.3     388     379     2     7     8          
    9     8     0.3     0.4     379     388     2     8     7          
    10     9     0.4     0.5     388     400     2     9     6     0.218256852     0.006756757 ==RSQ(E8:E10,D8:D10)
    11     10     1.5     0.6     499     500     2     10     5          
    12     11     0.5     0.6     420     448     2     11     4          
    13     12     0.6     0.7     520     530     1     12     3     0.973538061     0.971560719 =RSQ(E11:E13,D11:D13)
    14     13     0.7     0.8     540     550     1     13     2          
    15     14     0.9     1     560     570     1     14     1     1          1           =RSQ(E13:E15,D13:D15)
    When i do seperatly i am getting correct value what excel is showing
    
    select REGR_R2 (average, prof) from tableaa
    where a in (1,2,3)
    
    REGR_R2(AVERAGE,PROF)
    0.25
    
    
    select REGR_R2 (average, prof) from tableaa
    where a in (4,5,6)
    
    REGR_R2(AVERAGE,PROF)
    0.627906976744186
    create table TABLEAA
    (
      A       NUMBER,
      BEG     NUMBER,
      END     NUMBER,
      PROF    NUMBER,
      AVERAGE NUMBER,
      REGION  NUMBER
    )
    ;
    
    prompt Loading TABLEAA...
    
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (1, 0, .1, 159, 159, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (2, .1, .2, 159, 168, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (3, .2, .3, 179, 159, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (4, .1, .2, 250, 300, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (5, .2, .3, 320, 250, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (6, .3, .4, 250, 380, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (7, .2, .3, 388, 379, 2);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (8, .3, .4, 379, 388, 2);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (9, .4, .5, 388, 400, 2);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (10, 1.5, .6, 499, 500, 2);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (11, .5, .6, 420, 448, 2);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (12, .6, .7, 520, 530, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (13, .7, .8, 540, 550, 1);
    insert into TABLEAA (A, BEG, END, PROF, AVERAGE, REGION)
    values (14, .9, 1, 560, 570, 1);
    commit;
    Published by: user1849 on 22 Sep, 2009 11:59

    Published by: user1849 on 22 Sep, 2009 12:00

    Hello

    "The LINES BETWEEN PREVIOUS AND CURRENT LINE x" means that you do the math on a window containing x + 1 lines (previous lines plus 1 x current rank).
    Most desired window is 3 rows, so the largest x should be 2.
    Change the 3 literal returned by the expression BOX for 2:

    SELECT a.*,
           REGR_R2 (average, prof) OVER (ORDER BY rn
                                         ROWS BETWEEN CASE WHEN MOD (rn, 3) = 0
                                                                THEN 2          -- Not 3
                                                           WHEN rn_desc = 1
                                                                THEN  MOD (rn, 3)
                                                           ELSE  0
                                                      END  PRECEDING
                                               AND CURRENT ROW) AS r_square
    FROM   (select b.*,
                   row_number() over (order by b.a) rn,
                   row_number() over (order by b.a desc) rn_desc
            from   tableaa b
           ) a
    ORDER BY  a.a;
    

    The above call to REGR_R2 looks like something I wrote. If I told you to say 'THEN 3', I apologize.

  • Label and Format data binding work when running in JDev, but not deployment...

    Hello world:

    We run JDeveloper 10.1.3.42.70
    JHeadstart 10.1.3.2.51
    Our Oracle 10 g database is.

    I've been shooting some modifications of an existing Web page. Changes in which I remove an element of the page, or remove a box, this works fine running within JDeveloper (execution ViewController right-click menu arrow) and in the later deployment.

    But what I feel is anything in EO/VO data links - such as the format of a digital or a label behave differently when running in JDEV, then running deployed.

    When I change a label, or in a digital format in the folder of the local editor control tips entity/View, then run the application using the 'performance' within JDeveloper arrow, the changes appear as I expect.

    But I deploy this application, then run and formats and the old labels appear, but the new withdrawal of parts or elements is such that I wait for him. The new formats of labels / is displayed when the server is restarted. I'm testing if we can bounce the app, or bounce the container, but I wonder why these properties of the editor view/entity control Hint may not behave in the same way as other changes (deletion of point or region).

    I tried the model of cleaning & rebuild each time. I tried to clean the ViewController and rebuild each time. I closed my browser and deleted all the cache, then re-opened to make sure that I didn't put one old cached.

    After searching this forum, I tried the check from the "Bind prompt element to ADF BC control indication"Label text? '" under Tools - Preferences - settings of Jheadstart. Who hasn't made a difference.

    I do not understand why these changes form appearing when I run inside the JDEV app, but not when I deploy this application until the server is stopped. I hope certainly that I did not restart the server whenever I want to re - deploy.

    Does anyone have any suggestions? To try to understand what is happening here, I would also like to know where the text is generated when I make a change to a format or label. I can find references to the link in several files, for example ("#{bindings.") PersonLastName.label}'), but where is the actual location of the file that contains the label of 'Name' that I put in the entity control tips Editor folder in the "Text of the label" box?

    Is there a setting on the server? Is there something else I'm supposed to do?

    I appreciate any assistance.

    Mary
    U

    Mary,

    As long as the app server JAVA virtual machine is running, the adf business components are not reloaded. There is no mechanism for reloading available for business components on a JAVA virtual machine running. So, I'm afraid you will have to continue to restart the server. This also occurs when you run the application in JDev. She always starts a new OC4J instance, that's why you see the changes immediately JDev.

    Steven Davelaar,
    JHeadstart team.

  • To open this workbook, your computer must have a version of Microsoft Excel is installed and your Web browser must support opening files directly from Excel in the

    Im trying to open an excel file from a shared Web site, I used to be able to open them in Excel, when I used Internet Explorer, now all I see is the spreadsheet on a Web page, when I try to open the file in Excel (there is a tab that asked do you want to open in excel) I get a message "to open this workbook, your computer must have a version of Microsoft Excel is installed and your Web browser. must support opening files directly from Excel in the browser. »

    You have Excel installed?

    If so, can you use Internet Explorer for the Web site?

    As far as I KNOW, Microsoft is not an add-on for Firefox can be opened from Excel in Firefox. It may or may not work properly depending on whether this Web site uses a MIME type for files it delivers.

    Another way to handle that would be via Open Office or free agency; both are open source (free) that allows to display files XLS (Excel) , and both programs have a Mozilla browser plugin to allow Firefox to open the 'Calc' of these programs.

    http://en.Wikipedia.org/wiki/LibreOffice

    http://en.Wikipedia.org/wiki/OpenOffice.org > http://en.wikipedia.org/wiki/Apache_OpenOffice

  • Several sites, including gmail and all of myspace, recommend that upgrade to the latest version of my browser in order to enjoy a betetr experience.

    Several sites, including gmail and all of myspace, recommend that upgrade to the latest version of my browser in order to enjoy a betetr experience. Seems that these sites will not recognize that I am under firefox 10.0.2, these sites work fine in chrome, but not firefox.

    Message on the gmail website:
    A few important features may not work in this version of your browser, if you have been directed to the basic HTML version.

    Message on myspace:
    Upgrade your browser for a better experience of Myspace.

    Can you try to reset your useragent parameter? Instruction can be found here, see the statement of Helper7677 3rd

  • My Internet EXPLORER Favorites list include several photos, text files and downloaded web pages, of which none appear when I import my Internet EXPLORER Favorites list in Firefox. Is there a way I can remember those?

    My Internet EXPLORER Favorites list include several photos, text files and downloaded web pages, of which none appear when I import my Internet EXPLORER Favorites list in Firefox. Is there a way I can remember those?

    There is a work around:

    Export your IE Favorites to an HTML file, and then import it into Firefox. If you have questions more do not hesitate to ask.

  • left and right arrows no longer work in Safari, work in Excel, the top and bottom do not work

    left and right arrows no longer work in Safari, work in Excel, arrows up and down to work in Safari.  Any suggestions?

    What you're trying to do with the left and right arrows in Safari? The only time they will do anything is:

    • in a text edit box
    • If the page has a horizontal scroll bar
    • If the page is zoomed
  • I had installed windows 8.1 with bootcamp, it was a c drive and I tried to do a second drive d with management of the disks, but when I shrink c drive and format the partition which was made by the management of the disks to d ' training, it destroyed my

    I use macbook pro.

    I had installed Windows 8.1 with bootcamp, that there was a c drive, then I tried to do the second drive with disk management d when I shrink the c drive and format the partition which was made by the management of the disks to d ' training, it destroyed my mac osx.

    Please help solve this problem.

    This partitioning is not supported. Please download GPT Fdisk from http://sourceforge.net/projects/gptfdisk/ and install it on the Windows side. Once it is installed, thanks for posting the output as indicated in the CMD window.

  • Well, after spending several hours of research and not coming up with solutions, I'm finally back to get "out there". My problems with iMovie 09-1 - import a picture in iPhoto 9.6.1 in an existing project in very small. All the appe

    Well, after spending several hours of research and not coming up with solutions, I'm finally back to get "out there". My problems with iMovie 09-

    1. import a picture in iPhoto 9.6.1 in an existing project in very small. Everything seems OK, picture looks that it imported, 4S etc but in fact there nothing there except a black screen, long 4 seconds. I tried all the suggestions in a dozen of discussions but nothing works.

    2 - by sliding the cursor (pointer) on clips in the project or the event of the flip backwards and return to normal once the cursor is removed. Clips of transfer of events to the project smoothly and are right side up.

    What can be done on the transfer of photos and clips reversal?

    Are you running at El Capitan?   He does not play well with versions of iMovie earlier than version 10.

    (Even in 10.1 some pictures with some computers may show a black in the viewer screen, although in this case there are solutions.)

    Geoff.

  • producer iTunes tells me my account is attached to several suppliers of itunes and I have to create separate accounts to log on. What does that mean?

    When I am trying to connect to Itunes producer to present my book on ibooks, it tells me that my account is attached to several suppliers of itunes and I need to create separate accounts to log on. What does that mean? Can anyone help? Thank you!

    In the FAQ:

    http://www.Apple.com/iTunes/working-iTunes/sell-content/books/book-FAQ.htm l

Maybe you are looking for