Regd: Converting Numbers
Hi All,
How to Conver the Numbers into Alphabetical words i.e. if the toal value of a bill is Rs.6078.30/- in words how to convert it into words. like Ruppess Six thousand seventy eight and thiry paise only.
I tried with conversion from the last but while converting it gives an abap dump error.
Pls Suggestions and Help will be much appreciated.
Thanks & Regds.
Ramesh.
HI ramesh
you can use the functional module
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = IS_HEADER-NETWR
CURRENCY = IS_HEADER-WAERK
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = G_AMOUNT_WORDS
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
<b>
tyr this code it will help you</b>
FUNCTION Z_FI_AMT_WRDS_CONVERT .
""Local interface:
*" IMPORTING
*" REFERENCE(AMT)
*" EXPORTING
*" REFERENCE(WORD) TYPE SPELL-WORD
amt_c1 = amt.
replace '.' with 'D' into amt_c1.
SEARCH amt_c1 for 'D'.
IF sy-subrc = 0.
amt_wh1 = amt_c1+0(sy-fdpos).
wrk_fdpos = sy-fdpos + 1.
amt_dc1 = amt_c1+wrk_fdpos(2).
ELSE.
amt_wh1 = amt_c1.
amt_dc1 = '00'.
ENDIF.
amtnmr = amt_wh1.
amtdec = amt_dc1.
CONCATENATE amtnmr amtdec INTO amount.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = amount
currency = 'INR'
filler = ' '
language = 'E'
IMPORTING
in_words = amountrs.
*WRITE: / 'amount in figures: ' ,'Rs.-->', AMTNMR,'.',AMTDEC.
*WRITE: / 'Amount in WORDS.: ' ,' Rs.' ,AMOUNTRS-WORD,
*'AND' ,AMOUNTRS-DECWORD ,'Paisa Only'.
*SKIP.
CLEAR: unit1,digit1,unit2,digit2,unit3,digit3,unit4,digit4,word1,word2,
word3,word4,word.
digit1 = amtnmr+14.
unit1 = amtnmr+13.
digit2 = amtnmr+12.
unit2 = '0'.
digit3 = amtnmr+11.
unit3 = amtnmr+10.
digit4 = amtnmr+9.
unit4 = amtnmr+8.
digit5 = amtnmr+7.
unit5 = amtnmr+6.
digit6 = amtnmr+5.
unit6 = '0'.
digit7 = amtnmr+4.
unit7 = amtnmr+3.
digit8 = amtnmr+2.
unit8 = amtnmr+1.
digit9 = amtnmr.
unit9 = '0'.
*WRITE:/ 'UNIT9 = ' , UNIT9, 'DIGIT9 = ', DIGIT9.
IF ( unit1 NE '0' ) OR ( digit1 NE '0' ).
SELECT SINGLE wort INTO word1 FROM t015z WHERE einh = unit1
AND ziff = digit1 AND spras = 'E'.
word1 = t015z-wort.
REPLACE ';' WITH '' INTO word1.
*write: / word1.
ENDIF.
IF unit2 NE '0' OR digit2 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit2
AND ziff = digit2 AND spras = 'E'.
word2 = t015z-wort.
REPLACE ';' WITH '' INTO word2.
CONCATENATE word2 ' HUNDRED ' INTO word2.
*REPLACE '(FEMININE)' WITH '' INTO WORD2.
*write: / word2.
ENDIF.
IF unit3 NE '0' OR digit3 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit3
AND ziff = digit3 AND spras = 'E'.
word3 = t015z-wort .
CONCATENATE word3 ' THOUSAND ' INTO word3.
REPLACE ';' WITH '' INTO word3.
*write: / word3.
ENDIF.
IF unit4 NE '0' OR digit4 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit4
AND ziff = digit4 AND spras = 'E'.
word4 = t015z-wort.
REPLACE ';' WITH '' INTO word4.
CONCATENATE word4 ' LAKH ' INTO word4.
*WRITE: / WORD4.
ENDIF.
IF unit5 NE '0' OR digit5 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit5
AND ziff = digit5 AND spras = 'E'.
word5 = t015z-wort.
REPLACE ';' WITH '' INTO word5.
*write: / word5.
ENDIF.
IF unit6 NE '0' OR digit6 NE '0'.
*UNIT6 = 'H'.
SELECT SINGLE * FROM t015z WHERE einh = unit6
AND ziff = digit6 AND spras = 'E'.
word6 = t015z-wort.
REPLACE ';' WITH ' ' INTO word6.
CONCATENATE word6 ' HUNDRED ' INTO word6.
*REPLACE '(FEMININE)' WITH '' INTO WORD6.
*write: / word6.
ENDIF.
IF unit7 NE '0' OR digit7 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit7
AND ziff = digit7 AND spras = 'E'.
word7 = t015z-wort.
REPLACE ';' WITH ' ' INTO word7.
CONCATENATE word7 ' THOUSAND ' INTO word7.
*write: / word7.
ENDIF.
IF unit8 NE '0' OR digit8 NE '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit8
AND ziff = digit8 AND spras = 'E'.
word8 = t015z-wort.
REPLACE ';' WITH '' INTO word8.
CONCATENATE word8 ' LAKHS ' INTO word8.
*write: / word8.
ENDIF.
IF digit9 NE '0'.
unit9 = '0'.
SELECT SINGLE * FROM t015z WHERE einh = unit9
AND ziff = digit9 AND spras = 'E'.
word9 = t015z-wort.
REPLACE ';' WITH ' ' INTO word9.
*REPLACE '(FEMININE)' WITH ' ' INTO WORD9.
CONCATENATE word9 ' HUNDRED ' INTO word9.
ENDIF.
CONCATENATE word9 word8 word7 word6 word5 ' CRORE ' INTO wordc
SEPARATED BY space.
*WRITE:/ 'Amount in Rs.------->'.
IF amountrs-decword NE 'ZERO'.
CONCATENATE ' AND PAISE ' amountrs-decword INTO dcwrd
SEPARATED BY space.
ENDIF.
IF amtnmr > 9999999.
*WRITE: / WORDC.
*ENDIF.
CONCATENATE 'RUPEES' wordc word4 word3 word2 word1 dcwrd 'ONLY'
INTO word SEPARATED BY space.
ELSE.
CONCATENATE 'RUPEES'word4 word3 word2 word1 dcwrd 'ONLY'
INTO word SEPARATED BY space.
ENDIF.
CLEAR dcwrd.
*WRITE :/ WORD.
*WRITE: 'AND' ,AMOUNTRS-DECWORD ,'Paise Only
ENDFUNCTION.
regards
kishore
Message was edited by: Harikishore Sreenivasulu
Similar Messages
-
Need help in converting numbers to Italian text
Need help in converting numbers to text in Italian language. I want to knw is there any method other than SE63 to translate these text in one shot. I have tried with LSMW also (as the sheet is in XLS format ).Plz reply if anyone is aware of this ..
hi,
chk this code.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = amount
currency = 'EUR'
filler = ' '
language = 'E' => give the language as italian
IMPORTING
in_words = amountrs.
rgds
anver
pls mark all hlpful answers -
Help, How do I get rid of the grid marks when converting Numbers spreadsheet to PDF?
I'm having an issue when Converting numbers documents in to PDF. When I export to PDF, I get an additional page or two of gridlines..
I also get the chart lines and cell lines showing up on my PDF.
My equipment is MacBook Pro Mid 2012 - OSX 10.9.2
Running Numbers version 3.1Resize the table so it only contains the relavent cells for what you are printing by dragging the table resize controls:
activate the table, then drag size control:
Sized for data:
you can also use the scaling control in the print dialog to adjust the content to fit the page: -
Ios7 will not convert numbers to excel. Is there a solution?
Has apple addressed the issue with Ios7 not converting numbers to excel?
Do you mean Numbers? Numbers on OS X can export something in Excel format.
iOS 7 can read in Excel documents and open them for editing in Numbers for iOS if you wish.
But iOS 7 itself doesn't really have anything to do with converting documents _to_ Excel format, if that's what you're asking. -
UFL to convert numbers to Turkish words
Happy New Years to everyone and all that stuff.
I have had a look through a couple posts that refer to Turkish characters and a am hoping my idea of
creating a UFL that converts a number (passed in as a string) and then outputs the Turkish words for
the number, is possible or atleast on the right track.
This is my Turkish.properties file
0=su0131fu0131r
1=bir
2=iki
3=üç
To get Eclipse to accept these characters I tried setting the encoding to UTF-8 but eclipse said
UTF-8 conflicts with the encoding defined in the content type (ISO-8859-1)
Do you with to set it anyways?
Which I did and it seemed to keep the correct format for all that characters
I then created my UFL to just take a str_Key which is the number and the resBundleName (Turkish)
and I output the correct string. Just for testing I only worked with single digit numbers.
I then made my UFL avaliable to all my reports and created a test report.
The only problem was when previewing the output, it was no longer the correct UTF-8 characters
but the incorrect ISO-8859-1 characters ( I assume its this encoding as I tested what happens if
I save my properties file in that encoding and they seem the same messed up characters)
I have tried setting the "Text file encoding" for the report (right click - properties) but that makes
no difference.
So my question is:
Is it possible to create a UFL that will convert a number to Turkish words?
If so, where am I going wrong, is there another encoding setting I need to set?
Will I have future problems when trying to export to PDF?
Does anyone else have another idea on how best to convert numbers to Turkish words
if using a UFL and resource bundle is not the best idea?
Sorry thats 4 questions not 1 but hey, its my first post of the new year
Thanks all.Thanks Ted,
I did a simple test (which I really should have done before) where I placed Turkish characters in a report
formula and it displayed the correct characters, so that confirms what you said in that its not the report
error, but rather on the java side of things.
I will try fiddle with things and work out how to get the Java side of things accepting the Turkish characters.
I might come back here to ask a few questions if I get stuck, so will leave this open as it still deals with the topic.
Thanks again
Darren
Right Ted, thanks for that advice, I have managed to get correct characaters using the \u0131 format
for example
0=\u0131
1=\u00D0
2=\u00D0\u0131
Now the big question is where can i find a list of all the Unicode escapes (\u....) for Turkish equivilant?
Even though this is a real pain, to convert from English to Turkish to Unicode, would have thought
there would be an easier why, but this does do the job.
So I will continue looking for a list of all Unicode numbers (any body know if there is a app out there
that can do it all for me??)
Edited by: Darren Jackson on Jan 6, 2009 1:36 PM -
Regd: Converting Data in XML file
Hi All,
We hav a requirement to convert the data from Internal table into a XML file.
The scenario is we hav developed a program to download the data in XML format,the problem is when the file is converted inot XML format its giving erreor that
<b>The XML page cannot be displayed
End tag 'KUN' does not match the start tag 'KUNNR'. Error processing resource 'file:///C:/TEST.xml'. Line 2, Position 1712
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><IT_XML_OUT><item><VBE...</b>
The code is specified below for understanding.
TBALES DECLARATION
TABLES: VBAK, "Sale Order Header
VBAP, "Sale Order Item Data
VBEP, "Schedule Line Data
KNA1, "General Data in Customer Master
VBRP. "Billing Document Item Data
TYPES DECLARATION
TYPES : BEGIN OF TY_SOSTATUS,
KUNNR LIKE VBAK-KUNNR, "Customer Number
NAME1 LIKE KNA1-NAME1, "Customer Name
BSTNK LIKE VBAK-BSTNK, "Customer P.O.
BSTDK LIKE VBAK-BSTDK, "Customer P.O. Date
VBELN LIKE VBAK-VBELN, "Sale Order Number
ERDAT LIKE VBAK-ERDAT, "Sale Order Date
POSNR LIKE VBAP-POSNR, "Sale Order Line Item
MATNR LIKE VBAP-MATNR, "Material Number
ARKTX LIKE VBAP-ARKTX, "Material Description
KWMENG LIKE VBAP-KWMENG, "Sale Order Quantity
VRKME LIKE VBAP-VRKME, "Unit of Measurement
EDATU LIKE VBEP-EDATU, "Sale Order Schedule Date
FKIMG LIKE VBRP-FKIMG, "Despatch Quantity
GBSTA LIKE VBUP-GBSTA, "Overall Sale Order Status
PNDQTY TYPE I,
END OF TY_SOSTATUS.
TYPES : BEGIN OF TEMP_DISP,
VBELN LIKE VBAK-VBELN,
AUART LIKE VBAK-AUART,
ERDAT LIKE VBAK-ERDAT,
KUNNR LIKE VBAK-KUNNR,
BSTNK LIKE VBAK-BSTNK,
BSTDK LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE VBAP-KWMENG,
VRKME LIKE VBAP-VRKME,
END OF TEMP_DISP.
DATA: XML_OUT TYPE STRING.
INTERNAL TABLE DECLARATION
DATA : IT_SOSTATUS TYPE STANDARD TABLE OF TY_SOSTATUS
WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
DATA : IT_TEMP TYPE STANDARD TABLE OF TEMP_DISP
WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
DATA : BEGIN OF IT_XML_OUT OCCURS 0,
A(1500) TYPE C,
END OF IT_XML_OUT.
SELECTION SCREEN DECLARATION
SELECTION-SCREEN BEGIN OF BLOCK SOBLOCK WITH FRAME.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
S_ERDAT FOR VBAK-ERDAT,
S_AUART FOR VBAK-AUART,
S_WERKS FOR VBAP-WERKS.
SELECTION-SCREEN END OF BLOCK SOBLOCK.
START OF SELECTION
SELECT SVBELN SAUART SERDAT SKUNNR SBSTNK SBSTDK
LPOSNR LMATNR LARKTX LKWMENG L~VRKME FROM VBAK AS S
INNER JOIN VBAP AS L
ON SVBELN = LVBELN
INTO CORRESPONDING FIELDS OF TABLE IT_TEMP
WHERE S~AUART IN S_AUART AND
S~ERDAT IN S_ERDAT AND
L~WERKS IN S_WERKS .
CALL TRANSFORMATION (`ID`) SOURCE IT_XML_OUT = IT_TEMP[] RESULT XML XML_OUT.
CALL FUNCTION 'SOTR_SERV_STRING_TO_TABLE'
EXPORTING
TEXT = XML_OUT
FLAG_NO_LINE_BREAKS = 'X'
LINE_LENGTH = 65000
LANGU = SY-LANGU
TABLES
TEXT_TAB = IT_XML_OUT[].
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'C:\TEST.xml'
TABLES
data_tab = IT_XML_OUT[].
Is there any other way to process this and download in XML format.
Help and Suggestions will be much Appreciated.
Thanks & Regds.
Ramesh.Hi ramesh,
1. itab --- > xml
xml ---> itab.
2. This program will do both.
(just copy paste in new program)
3.
REPORT abc.
DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
FIRST PHASE
FIRST PHASE
FIRST PHASE
Fetch Data
SELECT * FROM t001 INTO TABLE t001.
XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = itab.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:\xx.xml'
TABLES
data_tab = itab.
SECOND PHASE
SECOND PHASE
SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
regards,
amit m. -
Exporting/ Sharing - Converting Numbers to HTML5?
Is there a way - or a utility / app - to convert a numbers file to HTML5?
I have a lot of numbers spreadsheets that contain popups, checkboxes, etc - and none of it will convert to Excel. I need to be able to exchange my files with other users, some of which don't have Numbers.
Any suggestions for alternative ways to share are welcomed - provided I can maintain all my popups and other features. Thanks in advance.If you need to share with others it is important to settle on THAT before you develop the solution. That said I am not aware of a translator.
-
HT201279 convert Numbers file to Excel format
When I convert my Numbers file to Excel format, each worksheet name is appended with "Table - 1".
Each subsequent conversion adds another "Table - 1" to the name of every worksheet as well.
How do I stop this from happening?If you are exporting then importing repeatedly, it will keep appending these things to the names.
Numbers document with two sheets, both with a single table called "Table 1" will get exported as two Excel worksheets: "Sheet 1 - Table 1" and "Sheet 2 - Table 1". It creates a separate Excel worksheet for every table and names each with the sheet and table name.
Reimporting this to Numbers will result in a Numbers document with a sheet called "Sheet 1 - Table 1" and another called "Sheet 2 - Table 1" and both will contain a single table called "Table 1". It imports each Excel worksheet as a Numbers Sheet and creates a table for each called "Table 1".
It really doesn't work well to import & export repeatedly. Much better to use one app or the other. -
Hello friends i am in search of a programme to convert the number in to words.If u have do post.
There is more than one language in the world - to convert a number to english is simple - he had not even said, in which language it should be transferred. Especially for large numbers this is important, f.e. an american billion and an european billion is a big difference, because an european billion is an american trillion; an european trillion is a billion american billions and so on.
greetings Marsian -
Convert Numbers to Words in Check Printing
I am creating my own check template in SAPscript instead of a smartform simply because I did not want/find a driver program for a smartform. I am a little confused on how to perform ABAP function calls in SAPscript and need some help. I figure this ABAP code will do the job:
DATA: wa_amt TYPE SPELL.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = 100
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = it_amt
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
o
+
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE 'A' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write wa_amt-WORD.
But I think this code is meant for a smartform->program lines. I want to convert the variable "REGUD-SNETT" from a number to a string of words.
On a side note, how to do I set a break-point in my SAPscript so it enters debug mode after I post the check document in transaction code f-58?------------------ Amount in words -------------------------------------
/ &'*** 'SPELL-WORD& ®UD-WAERS&&' and 'SPELL-DECIMAL(2)'/100 '&***
/* Example for amount and decimal places in words
/* &'*** 'SPELL-WORD& ®UD-WAERS&&' and 'SPELL-DECWORD' Cents'& ***
/* Example for numbers in words
/* &SPELL-DIG06(6)&&SPELL-DIG05(6)&&SPELL-DIG04(6)&&SPELL-DIG03(6)&&SPELL-D
If you want to see the details Open F110_PRENUM_CHCK Script and check the window code for Amount in words (Description of window)
If it is useful, please reward me with points. -
Convert Numbers to Excel Format
How do i take a numbers spreedsheet and convert it to Exel so when I send it my buddy how has a pc can read it?
File > Export numbers then tick the Excel option.
Attach to mail and tick the "send windows friendly" option.
Best. -
PLEASE HELP! Converting numbers into real words
I am faced with a problem. I need to create a prorgram that will convert a number ex. 156 into the word "one hundred fiftysix" This program will need to handle numbers up to 999 999 999.
If someone has a program similar to this or is willing to assist a newbie programmer, your assistance would be appreciated.
Also source code is preffered, prefferbly with c as the console.
Thanks againHere is my most up to date code
I also forwarded you a copy of my code
import hsa.Console;
public class ConvertingWordsToNumbers
private static int convertingFromOneToNineteen (String numberString)
String oneToNineteenInWords [] = {"", "one ", "two ", "three ", "four ", "five ", "six ", "seven ",
"eight ", "nine ", "ten ", "eleven ", "twelve ", "thirteen ", "fourteen ", "fifteen ",
"sixteen ", "seventeen ", "eighteen ", "nineteen "};
int oneToNineteenInNumbers [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
int total = 0;
//Checking for each word and adding it to each total
for (int pos = 1 ; pos <= oneToNineteenInWords.length ; pos++)
if (numberString.indexOf (oneToNineteenInWords [pos]) >= 0)
total += oneToNineteenInNumbers [pos];
numberString = numberString.substring ((numberString.indexOf (oneToNineteenInWords [pos])));
return total;
return total;
private static int convertingFromTwentyToNinety (String numberString)
String twentyToNinetyInWords [] = {"", "", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy",
"eighty", "ninety"};
int twentyToNinetyInNumbers [] = {0, 0, 20, 30, 40, 50, 60, 70, 80, 90};
int total = 0;
//Checking for each word and adding it to each total
for (int pos = 1 ; pos <= twentyToNinetyInWords.length ; pos++)
if (numberString.indexOf (twentyToNinetyInWords [pos]) >= 0)
total += twentyToNinetyInNumbers [pos];
numberString = numberString.substring ((numberString.indexOf (twentyToNinetyInWords [pos])));
return total;
return total;
public static void main (String [] args)
Console c = new Console ("ConvertingWordsToNumbers");
//Variable Declaration
String numberString, millions, thousands;
String keyWords [] = {"million", "thousand"};
//User Input
c.println ("Please enter the number (in words) that you wish to convert: ");
numberString = c.readLine ();
numberString = numberString.toLowerCase ();
//Sectioning the millions and thousands
if (numberString.indexOf (keyWords [0]) > 0)
millions = numberString.substring (0, (numberString.indexOf (keyWords [0])));
c.println (millions);
c.println (convertingFromOneToNineteen (millions) + convertingFromTwentyToNinety (millions));
if (numberString.lastIndexOf (keyWords [1]) > 0)
thousands = numberString.substring ((numberString.indexOf (keyWords [0]) + 8),
(numberString.indexOf (keyWords [1])));
c.println (thousands);
c.println (convertingFromOneToNineteen (thousands) + convertingFromTwentyToNinety (thousands));
else if (numberString.lastIndexOf (keyWords [1]) > 0)
thousands = numberString.substring (0, (numberString.indexOf (keyWords [1])));
} // main method
} // ConvertingWordsToNumbers class
thanks again -
How to convert Numbers files to pdf
Hi. I have a large number of Numbers documents I want to give to my book-keeper. She doesn't use a Mac, so she can't use Numbers files. I want to convert them to PDF so she can view them.
I've been converting them manually. This is what I do:
1) Open the Numbers file.
2) Choose Print.
3) Select "All Sheets". This is important because I have 5 sheets in each document.
4) Choose "Save as PDF".
5) The default name is fine, so press OK.
6) Close the Numbers file.
I have hundreds of these files. Is there a way I can automate the process of converting them?
Thanks for the help!Hello
You may try the following script. It will ask you to choose folder where Numbers files reside and then export every Numbers file in the chosen folder as PDF. Export destination folder will be the last folder you used for export. So you'd better export one file in advance and select the export destination folder you want to use. It will replace existing pdf file in destination folder.
Menu text are assumed in English and hard coded in script. For languages other than English, please edit the following three properties in export_as_pdf() handler:
property export_menu : "Export…"
property image_quality : "Good" -- Good | Better | Best
property layout : "Sheet View" -- Sheet View | Page View
The first one is menu item name of File > Export… (note … is U+2026 HORIZONTAL ELLIPSIS, which can be inputted by option ; in English keyboard for instance) and the rest are for options in Export sheet.
Tested with Numbers 2.0.5 under OSX 10.6.5.
Hope this may help,
H
_main()
on _main()
script o
property ff : {}
property xx : {}
property yy : {}
set f to choose folder with prompt "Choose folder of Numbers files"
tell application "Finder"
set ff to (files of f whose name ends with ".numbers") as alias list
end tell
tell application "Numbers" to launch
repeat with f in my ff
tell application "Numbers"
tell (open f)
if my export_as_pdf("", {_replace:true}) then
set end of my xx to f
else
set end of my yy to f
end if
close
end tell
end tell
end repeat
tell application "Numbers"
display dialog "Exported " & (count my xx) & " of " & (count my ff) & " files." giving up after 20
end tell
end script
tell o to run
end _main
on export_as_pdf(pdfname, {_replace:_replace})
string pdfname : output pdf file name (pdfname = "" denotes the current name whose extension is replaced with "pdf")
boolean _replace : true to replace existing pdfname, false otherwise
return boolean : true if operation is not canceled, false otherwise (in case _replace = false and pdfname already exists)
script o
property export_menu : "Export…"
property image_quality : "Good" -- Good | Better | Best
property layout : "Sheet View" -- Sheet View | Page View
property _canceled : false
tell application "Numbers"
activate
if pdfname ≠ "" then set the clipboard to pdfname
end tell
tell application "System Events"
tell process "Numbers"
tell menu bar 1's menu bar item 3 -- File
tell menu 1's menu item export_menu -- Export…
click
end tell
end tell
tell (window 1 whose subrole = "AXStandardWindow")
tell sheet 1
tell radio group 1
tell radio button 1 -- PDF
if value ≠ 1 then click
end tell
end tell
tell pop up button 2 -- Image Quality
if value ≠ image_quality then
click
tell menu 1's menu item image_quality
click
end tell
end if
end tell
tell pop up button 1 -- Layout
if value ≠ layout then
click
tell menu 1's menu item layout
click
end tell
end if
end tell
tell button 1 -- Next…
click
end tell
end tell
end tell
--keystroke "d" using {command down} -- desktop
if pdfname ≠ "" then keystroke "av" using {command down} -- select all and paste in file name
keystroke return
tell (window 1 whose subrole = "AXStandardWindow")
tell sheet 1 -- save sheet
repeat while exists
delay 0.1
tell sheet 1 -- alert sheet (already exists)
if exists then
if _replace then
click button 1 -- Replace
else
click button 2 -- Cancel
set _canceled to true
end if
end if
end tell
if _canceled then click button 3 -- Cancel
end repeat
end tell
end tell
end tell
end tell
return not _canceled
end script
tell o to run
end export_as_pdf -
Convert Numbers to Excel using Windows?
My macbook is out for repair for the next 5-7 days. I backed up all of my data, but now I realize I don't have another mac, or know anyone with one, to open my personal budget with. Is there any way to convert the numbers format to excel under windows? I noticed the file looks like just an xml file, anyone know of a conversion program out there?
Do you think if I took the file in on a usb stick to the apple store they might let me export it to excel real quick?
-DaveHello
If it not too huge you may send me as attachment.
I will export it as E…l and send it back.
If it is too big, you may do the same using YouSendIt.
koenig PERIOD yvan AT tele2 PERIOD fr
Yvan KOENIG (from FRANCE samedi 10 novembre 2007 19:16:57) -
How do I convert .numbers to MS excel
how do i convert a .numbers file into something I can open in MS excel?
If you are using Numbers for iOS, tap on the wrench/spanner then Share and Print & then choose one of the option such as Email Spreadsheet. You will then have a choice of format.
Maybe you are looking for
-
My left click does not work on my track pad on my macbook pro 13 inch, is there a fix
my left click does not work on my track pad on my macbook pro 13 inch, is there a fix
-
How to share library on same mac with two users
please provide step by step instruction on how to share library for my two girls on the same computer. my older daughter already has itouch and library. Now for the holidays got younger one an itouch also and want to share the library. i am a novice
-
Very frustrated with lack of customer service on rebate offer
Back in August I upgraded my cable service with Comcast and became a new Verizon customer. I was informed of a rebate that paid back $50 on each smartphone purchased. Since I ordered the phones (iPhone 4) directly from the website and did not deal di
-
Problem with creating PDF in Photoshop, or Acrobat Output Preview
I saved a PDF in Photoshop and Acrobat's output preview the text was black in 4 colors and Rip did not have this problem. Why?
-
Java applet window blocking yahoo games
not a devloper, but I really need some help handling this java problem. when I log onto yahoo games, bar that says "java applet window" blocks the bottom portion of the screen. how can I get rid of this?