Ask Your Question
1

retrieving formula values [closed]

asked 2012-03-15 01:21:07 +0100

eg0e gravatar image

updated 2015-10-21 22:29:31 +0100

Alex Kemp gravatar image

I often have to concatenate() several columns in a spreadsheet that I am going to import into another program (like "first name", "last name" in the original will become "name" in the spreadsheet for import.)

Obviously, when I import this spreadsheet, I want to import the values, not the formula...

Currently what I do is:

*Assume that column A is "First Name" and column B is "Last Name"

  1. Create a new column C (name1)

  2. Insert formula "=concatenate(A2," ",B2)"

  3. Copy formula through the column

  4. Create a new column D (name2)

  5. Select all data in column C (name1) and copy to clipboard

  6. Paste-special to column D (name2) to move just the values

  7. Delete columns A, B and C

My question is, is there a way to perform steps 4-6 programmatically (e.g. change all cells in column C to their calculated value instead of formula?)

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-21 22:29:42.964107

2 Answers

Sort by » oldest newest most voted
1

answered 2012-03-16 14:14:09 +0100

You can easily write a macro for it but then you can even do the concatenation in the macro.

You are even free which language to use (StarBasic, Java, C++, C#, Python,...)

For more information see api.libreoffice.org

edit flag offensive delete link more
0

answered 2013-02-16 02:56:16 +0100

qubit gravatar image

updated 2013-02-16 02:58:53 +0100

Perhaps some kind of macro reference would be helpful here... or some example code?

(even a short macro example would be good to have here before we try to resolve this question)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-15 01:21:07 +0100

Seen: 1,093 times

Last updated: Feb 16 '13