You can use the style of reference R1C1 for SpreadsheetSetCellFormula

I'm setting up a spreadsheet where I want the sum of some columns appear at the end of the line.  The problem is that the number of columns can vary according to when the report is run.

A function SpreadsheetSetCellFormula is written like this for summing columns B through D and placing the function in column 5 (E).

< CFSET curRow = 2 >

< CFSET curCol = 5 >

< CFSET SpreadsheetSetCellFormula (sObjRollUp, "SUM(B2:D2)", curCol, curRow) >

But what happens if there are 10 columns, or 15 columns?

I tried and it doesn't work with the R1C1 reference style:

< CFSET SpreadsheetSetCellFormula (sObjRollUp, "SUM (#curRow #C #curCol R - 4 #: R #curRow #C #curCol - 1 #)", news line, curCol ") >

But that generates an Excel error.

I know (in Excel), if I turn R1C1 reference I can reference range a sum like this: = SUM(R6C2:R6C3), but if the R1C1 reference is disabled, this feature will not work.

If a couple of questions.

(1) is there a CF or Excel function to get the value of the 'LETTER' of a numeric column value (remember column, AA, AB, etc.).

OR

(2) is it possible CF to turn R1C1 making reference to the spreadsheet object.

I could be wrong, but I don't think that CF supports the R1C1 style.  However, you can use the underlying classes POI to convert a number of columns in a letter. Just be aware POI expects the index column to base zero, not one.

example of generating all the letters in column

util = createObject ("java", "org.apache.poi.ss.util.CellReference");

for (col = 1; col<= 256;="" col++)="">

Note: the numbers of the columns are zero-based (0)!

colLetter = util.convertNumToColString (col - 1);

WriteOutput ("R1C1 = [#col #] Alpha = [#colLetter #]")
" );

}

Post edited by: == cfSearching == -.

Tags: ColdFusion

Similar Questions

  • You can use the styles with brushes?

    Hi, you can add style to the brushes as you can do with custom forms? I'm using cs5 extended.

    I was wondering

    Thank you

    You cannot add layer styles to brushes in itself, but you can paint on a blank layer that has a layer style.

    Post edited by: R_Kelly

  • You can use the new magic keyboard with Apple TV 4Gen?

    You can use the new magic keyboard with Apple TV 4Gen?

    The ATV4 does not support any Bluetooth keyboard. You can use the Apple TV iOS with her application.

  • You can use the same connection to mobile broadband on your laptop & a smart phone?

    You can use the same connection to mobile broadband on your laptop & a smart phone?  IE, exchange between one & the other not use both at the same time?

    Hello

    I suggest you according to the question in this forum and check if that helps:

    http://social.technet.Microsoft.com/forums/en-us/w7itpronetworking

    It will be useful.

  • You can use the ZyXEL NBG-419N router in windows xp

    You can use the ZyXEL NBG-419N router in windows xp

    Hello

    The real question is to know if your wireless device is compatible which should be it that this router has also B and G
    capabilities. Check the Support and the Documentation of ZyXEL. If you think there may be problems (would be unusual)
    Check with the manufacturer of your device WiFi support and documentation.

    ZyXEL NBG-419N
    http://us.ZyXEL.com/products/details.aspx?PC1IndexFlag=20040520161256&CategoryGroupNo=2F39BF6F-E115-4047-A6C9-36833483A7CA

    One of the first things I do with a router is updates of the firmware.

    I hope this helps and happy holidays!

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Windows Search 4 the program active with a log on before you can use the start menu. It is sometimes impossible to open an Office application.

    Original title: search Windows 4

    With Windows Search 4, the program active at the log on before you can use the start menu. Several search screens occur and reproduce when they are closed. Sometimes it's impossible to open an Office, research childcare opening application.

    Hi Ken_978,

    ·         How long have you been faced with this problem?

    ·         Did you do changes on the computer before the show?

    ·         The question is only limited to Office applications?

    ·         What exactly happens when you try to open an Office application? You receive an error message?

    Follow the suggestions below for a possible solution:

    Method 1: I suggest that you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malware

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: While running scan on the hard drive if bad sectors are found on the hard drive when scanning try to repair this area if all available on which data may be lost.

    Method 2: If this does not help then you can uninstall and reinstall Windows search 4.0 on the computer.

    Follow the steps below to uninstall:

    a. click on Start

    b. click Control Panel

    c. select Add / Remove Program

    d. place a check on "Show updates"

    e. you will see Windows Desktop Search 4.0 and uninstall it.

    Reinstall back, you can see the link below:

    http://www.Microsoft.com/Windows/products/winfamily/desktopsearch/choose/windowssearch4.mspx

    Hope this information helps.

  • If you install and activate your Lightroom on a single computer, and dies from this computer, is it possible that you can use the same serial number on another computer?

    If you install and activate your Lightroom on a single computer, and dies from this computer, is it possible that you can use the same serial number on another computer?

    With most of their applications, you can disable it on a single computer, and then turn on another.  I'm not 100% sure of Lightroom, however.

  • You can use the new driver with an older version of db?

    Does anyone know if you can use the 11.2.0.2.0 new driver on an older version of the database, such as for example the 10g?

    The official JDBC faq is here (as of today, at least)
    http://www.Oracle.com/technetwork/database/Enterprise-Edition/JDBC-FAQ-090281.html#02_02

    He states:
    11.1.0 JDBC drivers can talk to RDBMS
    11.2.0
    11.1.0
    10.2.0
    10.1.0
    9.2.0
    version 9.0.1

    What JDBC drivers supported versions of Oracle database?
    11.2.0 JDBC drivers can talk to RDBMS
    11.2.0
    11.1.0
    10.2.0
    10.1.0
    9.2.0
    version 9.0.1

    So basically the latest driver can "talk" to what after 8i. In addition, g 10 drivers are not available for Java 6 (which has been around for a while now).

    ________________
    Published by: Bill S. on November 18, 2010

    (by Oracle support) Unless you have a reason not to, the top/most late driver version is preferable because it will last bug fixes.

    Here's another good document. If you have access to the Oracle support, search for document ID 401934.1, "Beginning with Oracle JDBC Drivers"

  • You can use old iMac as a monitor for mini Mac

    You can use 2008 iMac as a monitor for mini Mac?

    No, because the iMac of 2008 not display entered or supported to do so.

    See > use your iMac as a display with the target - Apple Support Display Mode

    You can use a connection network and something like ScreenRecycler

    See > https://www.screenrecycler.com/ScreenRecycler.html

    However, the best bet is to use a regular external monitor with the Mac Mini.

  • Is there a limit on the number of times you can use the recovery CD

    I have a desktop a6242n and the failed hard drive, I installed a new and inserted the recovery CD and it comes up with the message that this is not the correct CD for this computer. I made them when I first got the computer and used without problem. Is there a limit on the number of times I can use the recovery CD? If I buy a new game that will work?

    Hello

    There is no limit to how many times you can perform a recovery from the discs. The issue is likely because the hard drive does not have DMI information loaded on it. You will perhaps call HP and order a set of recovery disks and ask them to guide you through access to tools on the recovery disk to reload this information on the disc, assuming they are available.

    Good luck!

  • All of a sudden I can't type data on registered forms. The purple bar above shows "Please fill out the following form. "You can save the data entered in this for."

    All of a sudden, I can't type data on registered forms. The purple bar above shows "Please fill out the following form. You can save the data entered in the form.

    Program used to complete the form (I guess they are in PDF format)? OPERATING SYSTEM? Versions of both? Forms were filled before you save them?

  • You can change the size of a blade for a project?

    Hello

    I would like to know if you can change the size of a slide in a project?

    I am aware that you can change-> Rescale project

    That is it for the whole project, but what happens if I wanted to add more length to slide 6 only?

    Please let know us if this is possible.

    Thank you!

    Susanne

    No, all the slides have the same resolution, which is normal IMO for a file that is published as a film. Maybe if you explained what you want to achieve?

  • You can use the activity tracker and an application running at the same time?

    I've been running just with my watch and the Apple activity tracker.

    But I wanted to calibrate so tonight I ran with my iPhone, too.

    I tried to use the Nike + and the PPP of activity both starting on my watch. I ran with the application of the activity on the screen.

    When I did I stopped the activity app and went to the Nike + app, but it was stopped.

    Then can you run the application of activity and a different running application at the same time. Or do you need to start another app on your phone and activity on your watch?

    Thank you all

    Hello

    To save your route at the same time apps, save the workout using the application of the workout on your Apple Watch (early check it there first) and also through the application of Nike + running on your iPhone.

    Monitoring of your training via the integrated application of the watch workout will cause your heart rate to be monitored at all times for the duration of your workout.

    The app Nike + running cannot currently access heart rate monitor watch directly, but if I read the heart rate data of the health on the iPhone app, it will always be able to access - indirectly - the same heart rate for your exercise data:

    -On your iPhone, in the application of health, press Sources (tab) > Running > turn on Allow 'Running' to read heart rate data.

  • You can use the fax software of xp with a phone line I have just read

    I want to be able to send faxes to my computer but I don't have a telephone line.

    can you set up the fax program windows XP on a single dsl line

    Hi KariannERICKSON,

    To use Fax in Windows XP machine, you will need a fax modem connected to a phone line.

    For more information, see these links: How to enable and configure the fax in Windows XP service

    Faxing in Windows XP

    Hope the helps of information.

    Please post back and we do know.

  • You can use the x 86 version and the x 64 version on two different computers

    I have a key/installation of Windows 7, which can be used for installing the x 86 version or the x 64 version. Could I use the x 86 version and the x 64 version on two different computers?

    Hi hgcxngv,

    No - not at the same time.  A key is an installation by the license agreement (regardless of the size of bits).   Is excluding the special manufacturer or license multiple keys which normally applies to companies and I am sure that you would know if you had a since they would cost much more to buy and were more difficult to obtain (if you remember).

    You can install by using 32 bit on a computer and then uninstall it from this computer and install the 64-bit on the other or vice versa (although you'll probably need to use the help of phone to activate the second time since the automated process will most likely perceive it as an attempt to both facilities and reject and you will need manual for past this problem).

    The foregoing does not apply to OEM licenses that cannot be installed on computers with they came, live and die with this computer (even if the key would have worked on each version, perhaps in order to simplify things for the manufacturer).

    I hope this helps.

    Good luck!

    Kosh

Maybe you are looking for