Posted: Sat Apr 15, 2006 2:47 pm Post subject: Who can I pay to convert one macro from excel to calc?

The code is not crazy, in fact, it is probably pretty crappy code, as I did it myself, I am no programmer, and basically suck at excel. But, there is more of a help audience for the excel market, and through lots of hand holding, I was able to accomplish my task.

Basically, the code renames photos from an excel or calc list, from a defined area of a document the user chooses. It has pre determined photo names, and then it renames the original photos to like R394434.jpeg All automatically, and requires no through whatsoever and the end users part. and if there are multiple pictures based on like 1-5, then it adds a letter to the end to clarify it. I would like to change this a little, but getting it to work as is is the big thing.

How hard would this be to convert... and how much is it going to cost me? Or if nothing else, something from scratch in calc that is cleaner, and again, still does the same thing. Budget is not big, and I cannot find any people specifically saying they would do this. Enterprise staroffice is not an option. We are moving to openoffice specifically because it is free, and adding 15 users onto office, again, is not in the budget.

... but I haven't tried that aspect, using it primarily for family to select photos for putting onto CD [once a folder is selected, a simple look, then copy by pressing C transfers the photo to a collection for burning.

But... the list containing the specific file names is in an excel document that already has to be made. Running as a macro, the additional in document formulas, everything is idiot proof. A secondary program, even with excel import capabilities will not fully achieve what I need to.

As far as I can see so far, this VBA code is pointless, because you can implement the same thing with links and formulas.
If "pictureSheet" contains pictures you may create a dynamic hyperlink. Click that hyperlink, press Ctrl-C, activate the target and press Ctrl+V.
Copied from http://www.oooforum.org/forum/viewtopic.phtml?t=26620&highlight=hyperlink
Named reference "Path"
refersto: MID(CELL("FILENAME";A1);2;SEARCH("/[^/]+'#";CELL("FILENAME";A1))-1)

=HYPERLINK(Path&"SubDir/Data.ods#Sheet1.$A$1:$F$1000")
creates a hyperlink to sheet1.A1:F1000 in <this doc's path>SubDir/Data.ods

So, the macro, has additional information on the sheet. It has the default picture names (DSCN0001.jpeg) So, this person has 22 pictures in the example above, right now named DSCN0001.jpeg through DSCN0022.jpeg. The photos need to be renamed to:

I looked through your hyperlink file, and I cannot see how it would accomplish what I need. There are TWO seperate sheets, one that contains the example data from above, and then the one with the macros that will import the data, then rename the file names from the originals to the new ones with the extensions of necessary.

Is there just not a market for people to convert macros? It seems everyone either knows vba, or ooobasic.

David just tried to give a hint that you may use some apropriate tool for picture/file management. What I tried to explain is: If you really want to do this conversion of file-names by spreadsheet then your VBA-stuff is like using a crook, while having roller skates under your feet.
I took some minutes and made a quick draft without any macros. Notice the message I'll send you.
It works like this:
The document contains some linked dummy data.
Simply pick one of your files from Edit>Links, button Change....
My dummy-data will be replaced with your data from PictureSheet.A6:B105 from your selected file. That's all you have to do.

First sheet provides a calculated hyperlink to the current source-file.
Second sheet shows transformed file names.
It's just a quick draft, but most of it should work with *any* spreadsheet-program able to read the file.

[Sent a nasic-free draft to OP]
Now the macro-part: Why not writing an API-independant cell-function? This works just like VBA (ok, not that many builtin functions).
Function MYCONVERT(CellVal)
sVal = cStr(CellVal)
iPos = instr(sVal;"-")
[...]
MYCONVERT = sResult
End Function
Formula B2 =MYCONVERT($A2)
Notice that you just get a value of type String or Long passed from the referred cell A2.
Refer to the online-help on starbasic. Because you get the string to be modified from the referred spreadsheet-cell, you don't have to deal with API-stuff. StarBasic is very much like VBA without class-modules (you can use real object-oriented languages like C++, Python and Java). The huge difference is the API you talk to.
I would save the function in library "Standard" of a template. "Standard" is loaded automatically and the function keeps on working when you use the file elsewhere. Excel however refuses to use that, even if the formula is VBA-compatible. My XL97 crashes when you try to edit a starbasic-module. It may work with some newer version, but MS certainly has no interest to make this happen.