Problem with cfspreadsheet and excel files

Hello

I have a request from a client to generate a worksheet excel from a query. I have the query expel the fields and I can generate the Excel without a hitch. The problem comes when the customer takes excel file and then tries to handle it. The majority of the distress comes from fields that must be marked as currency or dates. I am, with a few combat capable of generating a 'real' date field Before this Excel was not correctly sort dates.

I was able to call an excel formula using this:

< cfset SpreadsheetSetCellFormula (, "DATEVALUE (#Chr (34) #Replacement_ETD ##Chr (34) #)", therow, 9) >

Date value Force Excel to recognize him as a real date field. However, this fails when this file is manipulated by excel. The next problem is the currency field. I can't get excel to recognize it as a currency. It's always personal. When it is set, the SUM function will not work in excel. You can add the fields individually as A1 + B1 + C1 = TOTAL. This will not help when there are 200 lines.

I was able to get a suggestion from an other CF developer who has had a similar situation. He generated the first with the appropriate items excel file and set the columns to their fields such as date and currency, etc.

The next step would be to fill the rank by rank, and they must be properly formatted.

Code:

("< cfset expandPath("./reports/arrivals.xlsx = filename ") >

< cfspreadsheet action = "read" src = "#filename #" name = "s" >

< cfset therow = 0 >

< cfoutput query = "myExcel" StartRowOptional = "1" >

< cfset therow = myExcel.currentrow + 1 >

< cfset SpreadsheetSetCellValue (holders, s, therow, 1) >

< cfset SpreadsheetSetCellValue (s, Section, therow, 2) >

< cfset SpreadsheetSetCellValue (s, Position_Number, therow, 3) >

< cfset SpreadsheetSetCellValue (s, Position_Title, therow, 4) >

< cfset SpreadsheetSetCellValue (s, Incumbent_Emplyment_Type, therow, 5) >

< cfset SpreadsheetSetCellValue (s, Incumbent_ETD, therow, 6) >

< cfset SpreadsheetSetCellValue (s, Tour_Comments, therow, 7) >

< cfset SpreadsheetSetCellValue (s, replacement, therow, 8) >

< cfset SpreadsheetSetCellValue (s, Replacement_ETA, therow, 9) >

< / cfoutput >

< name cfheader = "content-disposition" value = "attachment; filename = Departures_ (#DateFormat (now (), 'MMDDYY') #) .xls ">"

< cfcontent type = "application/msexcel" variable = "#spreadsheetReadBinary (s)" # "reset ="true">"

The data in the cells has already been formatted properly. When this file is generated and sent to the user columns are not formatted as expected.

Does anyone know if this method will work or have a better suggestion on CF getting to generate a suitable date and currency field to Excel for acknowledge?

Adobe ColdFusion running on RHEL 5 v10

Thank you

For some reason, you need to format it twice - once before the data is inserted and one after.

This is especially true if you have data values that are integers.  These, even if you format cell advance to be 'Text', always align to the right, as do the integers.  However, if you reapply the formatting after inserting the data, then it must be formatted correctly.

HTH,

^_^

PS. Thank YOU for taking the time to code for spreadsheetsetcellvalue (CF)!  Too many people become lazy and chuck just a query to an object tag cfspreadsheet.

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

  • problem with image and pdf files to print

    Hello

    When I want to print images and PDF files in windows 7, it takes too much RAM space so small capacity it has (for example, the file has 52 KB capacity, but it takes 21 MB of RAM)

    and I have to wait until this file (image or PDF) completely buffered in RAM, and that is problematic for me.

    Help me please.

    Thank you

    Hello Amirafshari,

    Thanks for posting your query on the Microsoft Community.

    We need to know the following information to isolate the problem:

    1. When you print files no PDF, you have the same problem?
    2. What are the specs of your PC?
    3. Where are the files located? Is this an internal or external storage device?
      • If the file is located in your external storage space, you can transfer into your internal storage space first before printing.
    4. Have you tried the activation and deactivation of your print spooler? If this isn't the case, please follow the steps below:
      • Go to CMD.
      • Type "net stop spooler" and press ENTER to stop the spooler.
      • Type "net start spooler" and press ENTER to re start the spooler.

    Let us know how things are going.

    Kind regards

    Jamille Nar

  • I keep having problems with 3ds and .obj files

    Any time I try to import a 3ds file I get errors saying that I don't have enough RAM. Say they cannot parse the EPS files. I have 8 GB of RAM, so this seems unlikely. I've looked everywhere for a solution to this.

    My ultimate goal is to take a model of MacBook Pro in Photoshop import into After Effects.

    For some reason it works ever.

    I'm on an i7 MacBook Pro 2011 with 8 GB of RAM. 10.6.8 running

    Any help would be appreciated.

    Hi Jason,

    Thanks for the links. Nice samples.

    On the model, there are a few things. The holes to vent on each side of the keyboard is primarily what causes the problem of load. When explode you all nested components, there are more than 100 entities K and I'm guessing that the importer of collada Ps is not like that. "Undesirable" Triangulating you see comes from faces in collision. If you go to 3D > render... settings and check the 'remove back faces' section face Style, your Ray Trace should look much better.

    Here's what I came up with the deleted holes (let me know if you want the source of .dae or psd files):

    I saw something large on the use of the Ps in After Effects 3D layers. The General interop has some major roadblocks. I'll see if I can get some tips for you (you ask or heard from Todd Kopriva?)

    Kind regards

    Steve

  • I have a problem with adding and deleting files in Windows Media Player.

    Media Player will not play the selected files but then goes on to play other files. When I delete the files from the media player and try re - add I get the message "the media player is installed incorrectly. Have tried to reinstall media player, but it always fails at the implementation stage. It seems that the link between the player and the music files has been corrupted. Further, I have not found another way to read these files! They are referred to as Windows media audio files. Is that mean that only Media Player can read? I have hundreds of music files. Any help please? I can't upgrade XP on this computer so intended to stick with it for another year or so.

    Original title: Media player 11 with XP SP3. Link to player with audio files has been corrupted?

    Hi Martyn,

    Thanks for keeping us posted and share this information with us.

    I would have you look at the article-

    http://www.Microsoft.com/windows/windowsmedia/player/Webhelp/default.aspx?&mpver=11.0.5721.5145&ID=C00D11DF&ContextId=89&OriginalID=C00D11DF

    Back to us for any issues related to Windows in the future. We will be happy to help you.

  • Problems with .dll and WPD files Volumn Driver Windows files is installed but does not work

    I wondered about the .dll files... I have internet explore as a default package as well as Java (TM) web start launcher by Oracle. Can you suggest other programs. I have all the Adobe programs. I would really be able to bind the DLLs of Visual Basic... but VB 08 also do not install and run on my computer, but also the Framework.NET version 4. Be an error in C:\Windows\system32\mvsvc.dll

    I couldn't install Windows WPD files Volumn driver and here's the windows diagnostic ran for me: what can I do to get this driver to run. Device in Windows systems manager is not supported on my system.

    Description

    Windows was able to successfully install device driver software, but the driver has encountered a problem when he tried to run. The problem code is 10.

    Signature of the problem

    Problem event name: PnPDeviceProblemCode

    Architecture: x 86

    Hardware ID: wpdbusenum\fs

    Configure the class GUID: {eec5ad98-8080-425f-922a-dabf3de3f69a}

    The PnP problem code: 0000000-a

    Driver name: WUDFRd.sys

    Driver version: 6.0.6001.18000

    Driver date: 01/19/2008

    The system version: 6.0.6002.2.2.0.768.3

    Locale ID: 1033

    Files helping to describe the problem

    DMI9C45.tmp.log.XML

    LOG9C46.tmp

    wpdfs.inf

    Thank you. I tried for days now to get this driver to run.

    Jann B

    Hello

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Technet Forum. You can follow the link to your question:
    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

  • "The file is not found" error message when you try to view recent items list for word and excel files

    Title files: original vista on the recent items list does not open

    When I select a file from my recent items list, I get an error message indicating that the file is not found, but it lists the correct path to the file, and if you go to this path of the file, the file is clearly there.  This happens with word and excel files but not the adobe pdf files.

    Hi GillianMO,

    Remember to make changes before this problem?

    Method 1: Run the fixit available in the links below and check if that makes a difference-Worth to try
    Diagnose and repair Windows files and folders problems automatically
    Difficulty of broken desktop shortcuts and common system maintenance tasks

    Note: FixIt would attempt to recover bad sectors on the hard disk, in the course of this process there are chances of DATA loss from that particular area.

    Method 2: If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

    If the problem persists, I suggest you to send your request in the Forum Office for more specialized help.

    Office Forum

    http://answers.Microsoft.com/en-us/Office/Forum/Excel?page=1

  • PROBLEMS OF VISTA WITH WORD AND EXCEL

    I'm having problems with microsoft word and excel.  I get the following error message:

    "Host process for windows services stopped working and was closed.  Wiindows will notify you if a solution is available. »

    Of course, I never heard with a Windows solution.

    •   

    Hello SAFEERN,

    It may not be a problem with Word or Excel.

    Read the article here mentions several problems that can cause the error "host process for windows services stopped working and was closed".

    Please answer back with an update so that we can know if one of the resolutions helped to solve your problem.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Photosmart Premium c309g-m: cannot print from word and excel files

    Hello

    My question previous (25/02/2016 09:44) problems with the HP Solution Center has been resolved today - I can open the program and I can scan.

    But now I can not print word and excel files - the paper is completely empty. I can print emails from google, but they are difficult to read.

    In Control Panel, devices and printers, I have until now had a HP printer: HP0BAC44 (HP Photosmart Premium C309g-m) but now I also have the printer: HP Photosmart Premium C309g-m (Standard). Who would have something to do with the problem? I tried printing from two of them, but the result is the same as mentioned above.

    Can you help me please?

    Thank you

    Peter S.

    Hello

    Bought a new printer (Envy 5646), and all my problems are solved.

    Thank you

    Peter S.

  • Problem with IMovie and Quick time

    Hey everybody,

    I am faced with an unexpected problem with Quicktime and I Movie, and I was wondering if someone had already known that:

    I want to create a film based on shots from my personal camera. I started to work with IMovie to create a sequence of opening and added his musical band. I exported the scenes in Quick Time format without any problem. However, when I merge the exported sequence of I film with shots of my video camera, the soundtrack is completely eliminated.

    I checked on the Internet and saw that there might be a problem of "Codecs". To avoid this, I exported the sequence IMovie with Codecs of same as one of my video camera files.

    Now, if I compare the files exported from I Movie and those of my video camera, they have identical characteristics. However, the soundtrack will always disappear when I merge them.

    Could someone please help me solve this problem?

    Thank you very much in advance.

    Concerning

    Could someone please help me solve this problem?

    Not only based on what you already said.

    I want to create a film based on shots from my personal camera. I started to work with IMovie to create a sequence of opening and added his musical band. I exported the scenes in Quick Time format without any problem. However, when I merge the exported sequence of I film with shots of my video camera, the soundtrack is completely eliminated.

    How would you"merge" files? (I.e. a "QuickTime" format is any form of data compatible with the platform of supply and the specific structure of QT incorporated into real employment that is stored in a container of MOV file on any of up to 99 tracks possible). Also, what app do you use for reading the file 'merged '? (For example, some media players ignore secondary audio tracks as a result of some methods of 'fusion' of files so it is important to know how the files are "merged," whether or not the audio data are "scattered" several tracks, and/or if the Media Player supports playback of multiple, sequential audio popular.)

    I checked on the Internet and saw that there might be a problem of "Codecs". To avoid this, I exported the sequence IMovie with Codecs of same as one of my video camera files.

    The specific codecs and settings using the specific version of iMovie? (The current Mac OS X operating systems have two X QT and 'classic' Qt integrated structure so it is important to know what structure is used here and how).

    Now, if I compare the files exported from I Movie and those of my video camera, they have identical characteristics. However, the soundtrack will always disappear when I merge them.

    As a general rule, you should review the file "merged" to determine why it does not play back correctly rather than comparing the characteristics of the source being merged files. The main problem here seems to be in your project workflow. That is, you seem to be when you perform an operation in two steps rather than edit several iMove multimedia files and then export the combined results in a video the video and audio tracks have been flattened and exported in standard compression formats with unified settings, features and the.

  • problem with Safari and the opening of sites

    problem with Safari and the opening of sites

    Please describe the problem in more detail?

    Try to reset the settings of Safari:

    1. open Safari

    2. click on the Safari menu at the top (to the right of the Apple logo)

    3. Select the Preferences/Privacy tab

    4. click on remove all data from the Web site

    5. close Safari.

    Remove cache Safari files:

    1. click on finder

    2. look for the menu GO to top

    3. click on GO and hold down the option key. This will show a user library folder.

    4. click library and find the Caches folder

    5. in the folder caches com.apple.Safari Ouvrezledossier

    6. move the Cache.db file Trash.

    This should solve the problem. If it does not help, try to disable the Safari extensions

    1. open Safari

    2. click on the Safari menu at the top (to the right of the Apple logo)

    3. Select Preferences

    4. find the Extensions tab

    5 disable all extensions of

    6. relaunch Safari

  • Want to Phoenix 860-010: problem with fonts and the noisy fan

    I have a new machine, just a day old, and I'm having a problem with fonts.  The file Explorer, Edge and other similar programs seem to go from a very readable font that lights up in half a second or less whenever I move down on the page in these applications.  Police that results is much more difficult for me to read because of the lightness that results. I have not met this problem before.  Frankly, I don't know the source of the problem.  Is it hardware (video card) or (Windows 10) operating system software?

    Hello @PhotoGene47,

    Thanks for the quick response!

    Have you tried to see the document that I mentioned in my previous post?  If you prefer to have the Board repaired, you can consider contacting the HP support by phone for additional options.  Please use the following http://www.hp.com/contacthp and create a folder for your question and contact HP. If you do not live in the United States / Canada, please click on the link below to get contact information for your region.
    http://WWW8.HP.com/us/en/contact-HP/WW-phone-assist.html

    I hope this helps.

    Please let me know if this information helps you solve the problem by marking this message as 'accept as Solution' , this will help others easily find the information they seek.  In addition, by clicking on the Thumbs up below is a great way to say thank you!

    Kind regards!

  • a problem with one of the files in the TestStand\AdapterSupport\LabVIEW directory

    When looking at the module a LabVIEW VI called for TestStand, I get the following message:

    A problem with one of the files in the TestStand\AdapterSupport\LabVIEW directory.  Please reinstall or repair.

    I made the mistake of cleaning C: in my computer.  Clean the C:\National Instruments downloads

    Why would someone put bits of applications or modules, etc. in such a directory?

    I'm not too crazy about restoring 11FR in this folder.  It's just crazy!

    If anyone has encountered this before?  No "easy"? outside re - install TS...

    Side note: I do not touch anything in the \Program files. National Instruments\TestStand\AdapterSupport\LabVIEW

    What version of LabVIEW and TestStand do you use?

    In 2012, TestStand, this directory is mapped to:

    C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 2012\AdapterSupport\LabVIEW

    Have you tried mass compiling the screws in this folder?

    I had to create a new 'TestStand - default values XX.llb"file, where XX is the last version of LabVIEW you use, but I have not seen this message before.

    Good luck

    PH

  • Problems with word and PDF after computer crash. Error "user has access privileges."

    Problems with word and PDF after crash

    My computer crashed and I had to run the recovery disk, the repair option, so he could run again. It does not format my computer but I had to re - install several programs. I reinstalled my copy of office for example.  I have an external hard drive where I put most of my files but since installing the recovery disc, it does not open some Word documents and gives a message error "user has not access privilege." It's the same thing with some pdf files. What can I do?  Please help because I can't open some of my documents from the University.

    Hello world
    I would like to just say thank you for your help and the problem is now solved.  In the end I paid someone to sort it out.  He explained that it was something like permissions for some of my files were owned by my old operating system and after that my computer crashed and I had to put through the recovery disc these permissions have been lost.  He told me that he had a program that looked for the old existing and re-installed.
    Thank you.

  • Problem with the transfer of files from the computer Windows XP to Windows 7 using Windows Easy Transfer.

    Original title: Put WET on the old computer

    When I try to use WET to transfer from old Win XP Win 7 again, I need trasfer WET to the old computer.  So I choose this option and move on to the part where it says "Select the USB flash drive where you want to save WET".  Well, in the window is the word "computer" I can't click on it, nor is the OK button light up.  What's wrong?

    Hello

    Thanks for posting in Microsoft Community!

    It seems that you have a problem with the transfer of files from the computer Windows XP to Windows 7 using Windows Easy Transfer.

    I imagine the inconvenience that you are experiencing. We are here to help and guide you in the right direction.

    I suggest you try the procedure described in the link and check if it helps.

    Transferring files and settings: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/transferring-files-and-settings-frequently-asked-questions

    For more information, please see the links.

    Transfer files and settings from another computer
    http://Windows.Microsoft.com/en-in/Windows7/transfer-files-and-settings-from-another-computer

    Windows Easy transfer

    http://Windows.Microsoft.com/en-in/Windows7/transfer-files-and-settings-from-another-computer

    Get back to us and let us know the State of the question, I'll be happy to help you. We, at tender Microsoft to excellence.

Maybe you are looking for

  • Custom report for several Datastore latencies

    Hello I would like to create a report from the latancy VMware Storage model, but have the ability to account for the multiple datatstores. I need to create a new report template to do this, or do I have to create a Service with the data store and to

  • How to stop paging of kernel?

    I am trying to stop Vista Home Premium 64 of paging memory kernel and, instead, load all the drivers of the nucleus in physical memory. Most of the articles point to the "DisablePagingExecutive" key in the registry to do this (http://support.microsof

  • All applications freeze briefly and then decline to (HP DV6-6001SA)

    Hello, I recently restored my laptop using the Recovery Manager HP and now applications freeze for about 1-2 seconds then thaw. This happens with all applications that I use (Firefox, GOMplayer/WMP, games, MalwareBytes) I tried to run a memory diagno

  • Color LAB

    HelloI have a question about color Lab, there is Posibility to read the value of laboratory?For example, I want to ask Illustrator if the selection of documents have SpotColorKind Lab, attract the attention of L, value, b.

  • Captivate 9 Advanced Actions break the module

    It is so incredibly frustrating. I had built a module in Captivate 8 and then converted to 9. Subsequently the entire module would publish, but wouldn't download on the internet - I got the spinning wheel, but nothing appeared.Now, I've reconstructed