OLE2 Calls in Excel.
I have a form (USing 6i) that builds an eccel sheet using OLE2
integration. It creates Excel sheet without any problems. But
after closing MS Excel, it stays in task manager as an active process.
As a result when the excel sheet is opened again, it just hangs.
I am doing everything by the book. Any clues ?
Hi,
Release object after every create_arglist.
eg: args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
OLE2.ADD_ARG(args, 3);
cell := OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value','Testing');
--> ole2.release_obj(cell);
Thanks
Kavitha
Similar Messages
-
OLE2 call freezes form session
I'm a Forms Developer. We recently converted to 11g forms and are running on 10g database (soon to be upgraded too).
The OLE2 process that allows Forms to open and work with Microsoft Excel & Word was up and working.
However, along the way, something changed in the server environment and now any OLE2 call simply freezes the Forms session. There were no changes made to the Forms / Libraries that were working.
Any ideas on what to consider?
Thank you.I would suggest {forum:id=82} is a better place to ask your question
-
Calling MS Excel from Forms 6.0
Can somebody tell me in detail how to call MS Excel from Oracle Forms. I would like to create a button on a form and when the user clicks the button, MS Excel should open and I need to populate all the relevant data into Excel spreadsheet.
ThanksYou will probably have to use the OLE2 package. Take a look at the demo oleexcel.fmb which comes with Developer 6.0 for some ideas on how to start. You might also want to look at the documentation Oracle produced on this topic for Forms 4.5. It may be old, but I believe it is still relevant. See:
http://technet.oracle.com/products/developer/pdf/oleexcel.pdf
Good Luck!
Chris -
Weblogic call a excel-file from URL doesn't open MSExcel but flat html
Weblogic call a excel-file from URL doesn't open MSExcel but flat html
Hi,
WLS 10.3.5
Forms 11.1.1.4
I do migrate from AS10g to WLS 10.3.5 / Forms 11
I get differences between FORMS 10 g / AS and FORMS 11 / WLS
when call an excel-file with web.showdocument
in 10g AS10g
the call
web.showdocumen('http://MyAS10_Server/myFormsMapping/myExcelfile.xls, _blank);
opens a Windows-Box
to decide
open with ( MSExcel )
or
download and save as File
in WLS 10.3.5 / FORMS 11.1.1.4
the call with webcache Port 8090 as well as Port OHS 8888
web.showdocumen('http://MyWLS_Server:8090/myFormsMapping/myExcelfile.xls, _blank);
opens promptly the excel-File into the Browser as html-Format
How to get the same way under WLS as before in AS 10g,
config OHS ?
regards
get answer here :
Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html
Edited by: astramare on Sep 12, 2011 11:59 AMWeblogic: when call a excelfile from URL doesn't open MSExcel but flat html
-
0
HI All,
I am having problem with the power pivot dashboard.
power pivot dashboard processing job fails with the follwoing error message.
SP 2013 with 2008 r2
SQL 2014 power pivot on new analysis server.
Data refersh of cube and database works finw form the power pivot gallery.
The Execute method of job definition Microsoft.AnalysisServices.SPAddin.UsageProcessingTimerJob (ID 726034a7-b9a9-45a6-b720-640b3f785e49) threw an exception. More information
is included below. Call to Excel Services returned an error.
ULS error:
EXCEPTION: System.InvalidOperationException: Call to Excel Services returned an error. ---> Microsoft.AnalysisServices.SPClient.Interfaces.ExcelServicesException: We're sorry.
We ran into a problem completing your request. ---> Microsoft.Office.Excel.Server.WebServices.ExcelServerApiException: We're sorry. We ran into a problem completing your request.
at Microsoft.Office.Excel.Server.WebServices.ApiShared.ExecuteServerSessionMethod(Boolean hasSessionId, String sessionId, CoreServerSessionMethod coreWebMethod, String name,
Boolean skipFeatureCheck)
at Microsoft.Office.Excel.Server.WebServices.ExcelService.OpenWorkbookInternal(String workbookPath, Boolean editingMode, String uiCultureName, String dataCultureName, Boolean
newWorkbook, Boolean suppressRefreshOnOpen, Boolean openExclusive, Status[]& status)
at Microsoft.Office.Excel.Server.WebServices.ExcelService.OpenWorkbookEx(String workbookPath, String uiCultureName, String dataCultureName, Boolean exclusive, Status[]&
status)
at Microsoft.AnalysisServices.SPClient.ExcelApi.<>c__DisplayClassa.<OpenWorkbookEx>b__9(ExcelService svc, Status[]& status)
at Microsoft.AnalysisServices.SPClient.ExcelApi.Call[T](String fileUrl, ExcelServiceCall`1 serviceCall) -
-- End of inner exception stack trace --- -
-- End of inner exception stack trace ---
at Microsoft.AnalysisServices.SPClient.ExcelApi.Call[T](String fileUrl, ExcelServiceCall`1 serviceCall)
at Microsoft.AnalysisServices.SPClient.ExcelApi.Call[T](String fileUrl, ExcelServiceCall`1 serviceCall, String methodName, Object[] parameters)
at Microsoft.AnalysisServices.SPClient.ExcelApi.OpenWorkbookEx(String fileUrl, String uiCultureName, String dataCultureName, Boolean exclusive)
at Microsoft.AnalysisServices.SPClient.ASSPClientProxy.OpenWorkbookModelForRefresh(String workbookPath, SessionLifetimePolicy lifetimePolicy)
at Microsoft.AnalysisServices.SPAddin.UsageProcessingTimerJob.RefreshUsageCube(GeminiServiceApplication application)
at Microsoft.AnalysisServices.SPAddin.UsageProcessingTimerJob.Execute(Guid targetInstanceId)
Thanks
RaviHI Ravi,
Did you find the solution?
Thanks in advance
Regards,
Faraz Javaid -
I am trying to do an RFC call from Excel to SAP using VBA. RFC is working fine for most the RFC enabled Function Modules except DDIF_FIELDINFO_GET and DDIF_FIELDLABEL_GET.
What can be the reason for this?
Can someonme please help me with a macro code where these FMs are working.
Also can someone please help me with some tutorial on SAP connection with Excel.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Nov 12, 2008 9:14 AMHello Jon.
DDIF_FIELDINFO_GET is not working for me either. But I have used another FM (/ZOPTION/LIVE_DDIF_FIELDINFO):
Public Sub RFC_FIELDINFO()
Dim Func As Object
Dim sapConn As Object
Dim tblFIELDTAB
Dim tblFIXED_VALUES
Dim intRow%
Dim intCol%
'* Sub : Call FM /ZOPTION/LIVE_DDIF_FIELDINFO *
'* Author : Holger Köhn *
'* Created : 23.08.2014 *
'* Changed : *
ThisWorkbook.Sheets("TEST").Activate
Cells.Select
Selection.ClearContents
ThisWorkbook.Sheets("TEST").Range("A1").Select
'* create RFC-Connection *
Set sapConn = CreateObject("SAP.Functions")
sapConn.Connection.RfcWithDialog = True
If sapConn.Connection.LogOn(1, False) <> True Then
MsgBox "Cannot Logon to SAP"
Exit Sub
End If
DoEvents
'* run FM /ZOPTION/LIVE_DDIF_FIELDINFO *
Set Func = sapConn.Add("/ZOPTION/LIVE_DDIF_FIELDINFO")
Func.Exports("TABNAME") = "AUFK"
Set tblFIELDTAB = Func.Tables("FIELDTAB")
If Func.Call = False Then
MsgBox Func.Exception
Exit Sub
Else
Application.ScreenUpdating = False
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells(1, intCol).Value = tblFIELDTAB.ColumnName(intCol)
Next
If tblFIELDTAB.RowCount > 0 Then
For intRow = 1 To tblFIELDTAB.RowCount
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells((intRow + 1), intCol).Value = tblFIELDTAB(intRow, intCol)
Next
Next
ThisWorkbook.Sheets("TEST").Activate
End If
Columns.AutoFit
Application.ScreenUpdating = True
End If
'* clear tblFIELDTAB *
Do Until tblFIELDTAB.RowCount = 0
Call tblFIELDTAB.Rows.Remove(1)
Loop
Set sapConn = Nothing
Set Func = Nothing
Set tblFIELDTAB = Nothing
End Sub -
Call to Excel Services returned an error.
In our on-prem environment, inside a document library i uploaded an excel powerpivot model(created by exporting data from two sharepoint list in the same site). Now i have configured data refresh for the excel file, but it's failing with the following error:Call
to Excel Services returned an error.
In ULS log files, i got this
EXCEPTION: System.InvalidOperationException: Call to Excel Services returned an error. ---> Microsoft.AnalysisServices.SPClient.Interfaces.ExcelServicesException: ECS failed with non-zero return status. First error is name='ExternalDataRefreshFailed'; message='An
error occurred while working on the Data Model in the workbook. Please try again. We were unable to refresh one or more data connections in this workbook. The following connections failed to refresh: DataFeed_3_datacollect-taxdemos-com
items '; severity='Error' at Microsoft.AnalysisServices.SPClient.ExcelApi.ValidateStatus(Status[] status) at Microsoft.AnalysisServices.SPClient.ExcelApi.Call[T](String fileUrl, ExcelServiceCall`1 serviceCall)
--- End of inner exception stack trace --- at Microsoft.AnalysisSe...
...rvices.SPClient.ExcelApi.Call[T](String fileUrl, ExcelServiceCall`1 serviceCall) at Microsoft.AnalysisServices.SPClient.ExcelApi.Call(String fileUrl, ExcelServiceCall serviceCall, String methodName, Object[] parameters) at Microsoft.AnalysisServices.SPAddin.DataRefresh.DataRefreshService.ProcessingJob(Object
parameters)
Can anybody help on how to fix this issue?
Please mark a post helpful/answer if it is really helpful or answer your queryHi Atijit,
Do you have any update?
Best Regards,
Eric
Eric Tao
TechNet Community Support -
when using ole2 to do a FileSaveAs command to Word 2002 my word application is freezing up and ends up in a
"not responding" state. The code works for some documents but not others. They are 1 page doc's. The ole2 call is
inside a .pll which is called from an oracle 6i form. The document is saved but control does not return to my form.
Anybody else running into this situation? Any alternatives for the ole2 call?Is this question regarding Oracle9i Lite ?
-
How to call method excel subtotal in ABAP program
I'm trying to call excel method subtotal, but i get an error (sy-subrc <> 0). How to correctly call this method? One of the parameters is an array. I've tried to use an internal table as the array, but ABAP syntax checker shows error.
Hi Vytautas,
The best way is to start recording a Macro(Tools->Macro->Record New Macro), and then do the operations (like entering data into cells, summing up, calculations,etc...)
once you are done, display the macro and you will find all the needful information regarding what metohds are to be called and how...
Regards,
Raj -
Hello,
Hope someone call help with the following.
I am trying to retrieve data from a table within SAP by using the following Excel VBA code.
Sub retrieve_table_contents()
Dim R3, MyFunc, App As Object
Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
Dim Result As Boolean
Dim iRow, iColumn, iStart, iStartRow As Integer
iStartRow = 4
Worksheets(1).Select
Cells.Clear
'Create Server object and Setup the connection
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = "QA2"
R3.Connection.client = "900"
R3.Connection.user = "mbrough"
R3.Connection.password = "st34lh"
R3.Connection.language = "EN"
If R3.Connection.logon(1, False) <> True Then
Exit Sub
End If
'Call RFC function TABLE_ENTRIES_GET_VIA_RFC
Set MyFunc = R3.Add("TABLE_ENTRIES_GET_VIA_RFC")
Dim oParam1 As Object
Dim oParam2 As Object
Dim oParam3 As Object
Dim oParam4 As Object
Set oParam1 = MyFunc.exports("LANGU")
Set oParam2 = MyFunc.exports("ONLY")
Set oParam3 = MyFunc.exports("TABNAME")
Set oParam4 = MyFunc.Tables("SEL_TAB")
oParam1.Value = "E"
oParam2.Value = ""
oParam3.Value = "LAGP"
If frmQuery.txtSelect <> "" Then
oParam4.Rows.Add
oParam4.Value(1, "ZEILE") = frmQuery.txtSelect
End If
Result = MyFunc.CALL
If Result = True Then
Set NAMETAB = MyFunc.Tables("NAMETAB")
Set SEL_TAB = MyFunc.Tables("SEL_TAB")
Set TABENTRY = MyFunc.Tables("TABENTRY")
Else
MsgBox MyFunc.EXCEPTION
R3.Connection.LOGOFF
Exit Sub
End If
Result = R3.TABLE_ENTRIES_GET_VIA_RFC(EXCEPTION, LANGU:="E", ONLY:="", TABNAME:="LAGP", SEL_TAB:=SEL_TAB, NAMETAB:=NAMETAB, TABENTRY:=TABENTRY)
'Quit the SAP Application
R3.Connection.LOGOFF
If Result <> True Then
MsgBox (EXCEPTION)
Exit Sub
End If
'Display table header
iColumn = 1
For Each ROW In NAMETAB.Rows
Cells(iStartRow - 1, iColumn) = ROW("FIELDNAME")
' For C and N datatypes, explicitly set the cell to TEXT format, otherwise leading zeroes will be lost
' when numbers are imported from a SAP text field
If ROW("INTTYPE") = "C" Or ROW("INTTYPE") = "N" Then
Range(Cells(iStartRow - 1, iColumn), Cells(iStartRow - 1 + TABENTRY.Rowcount, iColumn)).Select
Selection.NumberFormat = "@"
End If
Cells(iStartRow, iColumn) = ROW("FIELDTEXT")
iColumn = iColumn + 1
Next
Range(Cells(iStartRow - 1, 1), Cells(iStartRow, NAMETAB.Rowcount)).Font.Bold = True
'Display Contents of the table
iColumn = 1
For iRow = iStartRow + 1 To TABENTRY.Rowcount
For iColumn = 1 To NAMETAB.Rowcount
iStart = NAMETAB(iColumn, "OFFSET") + 1
' If this is the last column, calculate the length differently than the other columns
If iColumn = NAMETAB.Rowcount Then
iLength = Len(TABENTRY(iRow, "ENTRY")) - iStart
Else
iLength = NAMETAB(iColumn + 1, "OFFSET") - NAMETAB(iColumn, "OFFSET")
End If
' If the fields at the end of the record are blank, then explicitly set the value
If iStart > Len(TABENTRY(iRow, "ENTRY")) Then
Cells(iRow, iColumn) = Null
Else
Cells(iRow, iColumn) = Mid(TABENTRY(iRow, "ENTRY"), iStart, iLength)
End If
Next
Next
'Format the Columns
Range(Cells(iStartRow, 1), Cells(iStartRow + TABENTRY.Rowcount, NAMETAB.Rowcount)).Select
Selection.EntireColumn.AutoFit
End Sub
However when I run the code I get the following exception message. 'SYSTEM_FAILURE' and nothing is returned.
Does anyone know why this is?
Thanks,
MikeYou can send data from excel to the MII message listener with a simple http post.
Message format requirments can be found here:
[http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm|http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm]
Edited by: Christian Libich on Aug 10, 2009 10:14 PM -
Can I call MS Excel Function in Oracle
Hi everyone,
I prototyped my application in Microsoft Excel. In this prototype, I'm using the BETADIST() function, which returns the cumulative beta probability density function. And, yes, if you're like me, and not a statistician, it's pretty crazy. Just for fun, check out the wikipedia page on it, and you'll see what I mean. Anyway, so now, I'm trying to perform the same functionality as that function in my Oracle APEX 4.0/Oracle 10g-R2 app.
I've studied this function a bunch, and I couldn't find an equivalent function in Oracle to do what this function does. CUME_DIST... nope, DBMS_STATS_FUNC... nope. So, I assumed I would need to figure out what exactly the function does and basically rewirte it in Oracle using PL/SQL. I've already got questions out on Statistics and Excel forums trying to figure that out.
But, before I go any further and reinvent the wheel by coding out the logic embedded in this function (which is very hairy, of course), I wanted to check with you all and see if there's a way to invoke this MS Excel function through Oracle. Not sure if an external procedure can get to an Excel library, or how to do it if it can.
Any ideas?
Thanks!
MarkI'm pretty sure this BETADIST exists in Java already.Not natively I think.
But one can download Cern's COLT Libraries for High Performance Scientific and Technical Computing in Java.
Loading the libraries via loadjava
loadjava -user michael/xxxx@oracle_server:1521:oracle_sid -verbose -force -order -resolve -thin colt.jar concurrent.jarand creating a function
create or replace function betadist (alpha number, beta number, c number)
return number
as
language java
name 'cern.jet.stat.Gamma.incompleteBeta(double, double, double) return double';
/is rather straightforward.
Calling it
SQL> select betadist(4,5,0.4) from dual
BETADIST(4,5,0.4)
,4059136
1 row selected.the result coincides quite well with the example given in http://www.excelfunctions.net/Excel-Beta-Dist-Function.html. -
SQL Agent not running Script in Package which calls an Excel containing Macro
I have a script task in SSIS package which calls Excel VBA file containing Macro, this file is on the local drive, when I run this package through SSDT the package works ok and the macro does what it needs to. However when I set up a
sql agent job to call the package then it fails at the Script task. I have created a credentials and proxy user as my self so I should Have full rights.
But it fails through the job and not through SSDT, can you advise ?Hi Asad,
Since the error message “Script Task Run Excel: Error: Exception has been thrown by the target of an invocation” is too generic, we should find a way to return full error details from SQL Server Agent job. Firstly, configure logging for the steps you wish
to keep log data for. Secondly, create a stored procedure to return details of the step at which a job failed based on the job name. Finally, execute the stored procedure. For more details, please refer to the following blog:
http://www.sqlservercentral.com/articles/SQL+Server+Agent/67726/
In addition, the following similar two threads are for your references:
http://sornanara.blogspot.jp/2014/04/code-0x00000001-exception-has-been.html
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4a20219e-4a90-41be-acfe-b8846dc2c38a/error-while-executing-a-ssis-package-which-contains-a-script-task-through-sql-server-agent-job?forum=sqlintegrationservices
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Can I Use OLE2 to export Excel without having excel?
Dear all,
Can i use CLIENT_OLE2 to export from a form to an excel sheet without having the Microsoft excel installed on the AS (Application server)?
Thanks
$hOoO$hDear SHo0o0sh;
yes u can run it on client side but the client must have Microsoft office
like this :
PROCEDURE init_excel (application in out client_ole2.obj_type ,
workbooks in out client_ole2.obj_type ,
workbook in out client_ole2.obj_type ,
worksheets in out client_ole2.obj_type ,
worksheet in out client_ole2.obj_type )IS
args client_ole2.list_type;
begin
application:=client_ole2.create_obj('EXCEL.APPLICATION');
workbooks:=client_ole2.get_obj_property(application,'workbooks');
args:=client_ole2.create_arglist;
client_ole2.add_arg(args,1);
workbook:=client_ole2.get_obj_property(workbooks,'add',args);
client_ole2.destroy_arglist(args);
worksheets:=client_ole2.get_obj_property(workbook,'worksheets');
worksheet:=client_ole2.get_obj_property(worksheets,'add');
write_cell(worksheet , cell , 1 ,1 ,'your data');
write_cell(worksheet , cell , 1 ,2 ,'your data');
release_excel (application,
workbooks,
workbook ,
worksheets ,
worksheet);
end;
PROCEDURE write_cell (worksheet client_ole2.obj_type,
cell in out client_ole2.obj_type,
x number , y number , text varchar2) IS
args client_ole2.list_type;
BEGIN
args:=client_ole2.create_arglist;
client_ole2.add_arg(args,x);
client_ole2.add_arg(args,y);
cell:=client_ole2.get_obj_property(worksheet,'cells',args);
client_ole2.destroy_arglist(args);
client_ole2.set_property(cell,'value',text);
client_ole2.release_obj(cell);
END;
Hope it works.
Regards
Reda El Mitwally -
Scripting Illustrator actions, incorporating calls to Excel
Hello all, I need some help...
I am building a series of logos — based on word strings — using Illustrator CS4 with a combination of Actions, but also retrieving the word string from an Excel file.
Normally for one or two iterations of the process, I would not hassle with a script, but this is a mind-numbing repetitive task, and I have to make 6,000 logos!! Seems the ideal use for a script.
We have tried to work with ExtendScript Toolkit (ESTK) but we can't get our heads around how to make it do certain things, and I can't find anyone who really knows how to use ESTK correctly.
I have a MAC, so the script has to be written in Java Script or Apple Script.
Here's what I need to do:
Execute Action: Open a Master Illustrator doc. This doc is already configured with art board, pre-defined type box (Area Type Optioned), Charater Styles, Drop Shadow parameters set. <pause Action>
Run Script: Retrieve the word string from a cell in Excel worksheet (or CSV??). Some are single words, first letter capped. Some are two to four words Camel Cased. Example: "DinnerPartiestm". There are two additional charaters "tm" at the end of the word string that will be acted upon (remember these two characters for item 7 below)
Run Script: Place this WordString into the predefined type box in the Illustrator Master doc. That is, in Illustrator, "select" the type box so the cursor is at first position and place the word string — copy from Excel & paste into Illustrator? <pause Script>
Execute Action: Apply character style 1— font with point size, letter spacing, stroke and colour (It just happens to be red). Example: DinnerPartiestm <pause Action>
Run Script: Select all caps in word string. Example: DinnerPartiestm <pause Script>
Execute Action: Apply character style 2 — Caps Only (selected) — New point size, baseline offset. Example: DinnerPartiestm <pause Action>
Run Script: Select last two letters of word string. Example: DinnerPartiestm <pause Script>
Execute Action: Apply character style 3 — last two letters only (selected) — New point size, change colour, baseline offset. Example: DinnerPartiestm <pause Action>
Run Script: Select text box. <pause Script>
Execute Action: Apply Stylize > Drop Shadow — On contents of text box, preset DS parameters in either Appearence panel or Effect menu.
Execute Action: File > Save As .ai document. <at Save As dialog, pause action>
Run Script: Retrieve file name from Excel and place in Save As dialog (copy & paste?). In next column in Excel doc, same row, is a SEO-friendly file name. Example: word string is "DinnerParties"; file name (next column) is "logo-dinner-parties"
Run Script: Select folder to save the .ai doc into. Example: Folder is "Logos AI". <pause Script>
Execute Action: Complete Save As. Example: in Folder "Logos AI" now we have the file "logo-dinner-parties.ai"
Execute Action [assumes that the Saved As document — logo-dinner-parties.ai — is now the active one in Illustrator]: Save for Web & Devices. Preset to PNG24/Transparent. Correct file name will NOT be in Save field. <at Save dialog, pause action>
Run Script: Repeat retrieval process to get same file name from Excel.
Run Script: Select new folder to save the .png doc into. Example: Folder is "Logos PNG". <pause Script>
Execute Action: Complete Save for Web. Example: in Folder "Logos PNG" now we have the file "logo-dinner-parties.png"
Execute Action: Close
Repeat steps 1 though 19 until all word strings processed: Script has to know to go to next word string (next row) in Excel doc.
This is a tricky one, but there's got to be a way to automate the process... otherwise I'll go crazy doing this manually!!
IS THERE ANYBODY OUT THERE WHO CAN HELP?
Thanking you in advance for any assistance.
All the best.IS THERE ANYBODY OUT THERE WHO CAN HELP?
Depends on what you mean by "help." Are you asking someone to do the whole thing for you (would require more detail), or do you intend to do it yourself, but are stuck on something? (You say you "tried to work with ESTK" and "can't find anyone who really knows how to use ESTK correctly"; but you don't say specifically what you're struggling with in ESTK.)
...doc is already configured with art board, pre-defined type box (Area Type Optioned), Charater Styles, Drop Shadow parameters set.
Much of what can be done with any approach depends largely upon what Appearances and/or Effects are involved, and where. You imply that you want all of the "logo" to be contained in a single textFrame object. But Drop Shadow Effect cannot be applied at the character level, so it can't be included in a Character Style.
So if you don't want all the text to have the same drop shadow, you will be involving multiple textFrame objects. That will lead to the complication of having to position the two textFrames relative to each other, depending on their dimensions after the varying text is inserted.
Retrieve the word string from a cell in Excel worksheet (or CSV??)
With scripting, it would be inefficient and unnecssary to go back-and-forth to the spreadsheet to extract values one at a time. Typically, you would create an array containing the full set of values, and then iterate through the elements of the array.
Some are single words, first letter capped. Some are two to four words Camel Cased. Example: "DinnerPartiestm".
So you're going to need a sub-routine of some kind (in Javascript, a function) to find capital letters.
There are two additional charaters "tm" at the end of the word string that will be acted upon...
If this is the same in each instance, and if you are going to script this, there is no need to include it in the data. Insert the "tm" programmatically.
That is, in Illustrator, "select" the type box so the cursor is at first position and place the word string — copy from Excel & paste into Illustrator?
Using script, you don't have to select the textFrame, copy, or paste in order to insert content. You would declare a variable, assign its value (from the above-mentioned array), add the variable's value as text to textFrame's content.
Apply character style 1— font with point size, letter spacing, stroke and colour (It just happens to be red). Example: DinnerPartiestm
Here you will run into a difficulty inherent in Illustrator's poor implementation of stroked text. You can apply a Stroke at the Character level and include that Appearance in a Character Style. But Illustrator always positions such strokes in front of the fill--something you almost never want, because it "chokes" the fills, wrecking the shape of the characters. The workaround is to Add New Stroke and position that below the Characters listing in the Appearance Palette. But script provides no access to added strokes or fills and Added Strokes cannot be applied at the character level.
Select all caps in word string. Example: DinnerPartiestm
Illustrator cannot select discontiguous text strings. Again, script does not have to select objects in order to change their properties.
Apply character style 2 — Caps Only (selected) — New point size, baseline offset. Example: DinnerPartiestm
Apply character style 3 — last two letters only (selected) — New point size, change colour, baseline offset. Example: DinnerPartiestm
The applyTo method of the CharacterStyle object. Or, just set the size and baselineShift properties of the characterAttributes property of the textRange directly.
Apply Stylize > Drop Shadow — On contents of text box
Drop Shadow Effect cannot be applied to the contents (character level) of a textFrame--only to the textFrame object itself.
My very limited understanding of ESTK is that it is a scripting tool for use in Illustrator.
It's a script text editor included with the Creative Suite. You can use it to build scripts for any of the CS products (or entirely other purposes, for that matter). Or, you can choose to not use it at all. A Javascript is just a text file. Tools like ESTK add conveniences, references, etc., geared toward scripting.
So, I'm only acting on the word string....
But I am also not a coder...
Which is why I would look into simpler already-built methods before jumping into a tedious solution scripted for Illustrator. For example: Many, if not most, AI users are familiar with InDesign. InDesign provides a proper dataMerge feature that can handle ordinary tab-delimited text. It's handling of strokes on text is correct, unlike Illustrator. If you set it up accordingly, it can create all the separate pages for you.
You would:
1. Draw the fixed graphic in Illustrator.
2. Place the Illustrator graphic on InD's master page.
3. Set and style the text objects. Insert DataMerge tags.
4. Import the data and run the Merge function.
InD builds individual pages for each row of the data. You're done. Export to PDF. InD and Acrobat also have their own scripting models. Either one can handle the specific naming convention, if really needed.
Again, it depends on what exactly is "special" about the text object(s) you are manipulating with variable content. For example, if you're using an AI-specific Warp effect, you'd be back to Illustrator.
Anyway, you want a paying gig?
I do some freelance work as time permits and interest strikes, but I'm not cheap, and that's not why I frequent these forums.
Scripting your solution entirely in AI may very well be possible, but whoever does it will need to see the specific objects, styles, etc., involved to avoid unnecessary guessing and time-consuming round-tripping. Why don't you post an image and/or an AI file?
JET -
Hi,
I am trying to call a RFC (ZTAB_FIELD_DET) by using VBA
as I am new to this feature I dont know much about the possible causes of some errors.
here is the code of RFC which will accept the table name, field name and language. And in turn it will return the Datatype of the field its length and description
**************************RFC Start*******************************:
FUNCTION ZTAB_FIELD_DET.
""Local Interface:
*" IMPORTING
*" VALUE(I_TNAME) TYPE TABNAME
*" VALUE(I_FNAME) TYPE FIELDNAME
*" VALUE(I_LANG) TYPE LANG
*" EXPORTING
*" VALUE(E_DATATYPE) TYPE DATATYPE_D
*" VALUE(E_FIELDLENGTH) TYPE DDLENG
*" VALUE(E_DESC) TYPE STRING
*temporary FM created which can retrieve the field details of a table
DATA : BEGIN OF wa,
datatype LIKE dd03l-datatype,
leng LIKE dd03l-leng,
reptext LIKE dd03m-reptext,
END OF wa,
itab LIKE TABLE OF wa.
SELECT ldatatype lleng m~reptext
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( dd03l AS l JOIN dd03m AS m
ON lfieldname EQ mfieldname AND
ltabname EQ mtabname )
WHERE l~tabname EQ i_tname AND
l~fieldname EQ i_fname AND
m~ddlanguage EQ i_lang.
LOOP AT itab INTO wa.
e_datatype = wa-datatype.
e_fieldlength = wa-leng.
e_desc = wa-reptext.
ENDLOOP.
ENDFUNCTION.
*********************RFC End**********************************
and now here is the code that i use in VBA
'*****************VBA start******************************
Set functionCtrl = CreateObject("SAP.Functions")
Set sapConnection = functionCtrl.Connection
sapConnection.client = "xxx"
sapConnection.user = "xxx"
sapConnection.Language = "xxx"
sapConnection.hostname = "xxx"
sapConnection.Password = "xxx"
sapConnection.SystemNumber = "xxx"
sapConnection.Destination = "xxx"
If sapConnection.logon(0, False) <> True Then
MsgBox "No connection to R/3!"
Exit Sub 'End program
Else
MsgBox "Connection to R/3 successful"
' adding the RFC to functionCtrl Object
Set RfcCallTransaction = functionCtrl.Add("ZTAB_FIELD_DET")
RfcCallTransaction.imports("I_TNAME") = "MAKT"
RfcCallTransaction.imports("I_FNAME") = "MAKTG"
RfcCallTransaction.imports("I_LANG") = "EN"
If RfcCallTransaction.Call = True Then
MsgBox "Datatype" + RfcCallTransaction.imports("E_DATATYPE").Value
MsgBox "FieldLength" + RfcCallTransaction.imports("E_FIELDLENGTH").Value
MsgBox "Description" + RfcCallTransaction.imports("E_DESC").Value
Else
MsgBox " Call Failed! error: " + GetCustomers.Exception
functionCtrl.Connection.Logoff
End If
End sub
'************************VBA End*****************************************
When I run this code, connection to SAP is successful but the
>><i>Set RfcCallTransaction = functionCtrl.Add("ZTAB_FIELD_DET")</i>
shows 'RfcCallTransaction' value as 'Nothing'
and the error message thrown is
"SAP Datatype not supported"
and in the debugger it throws
"Object variable or with block variable not set"
Need your valuable inputs on this
Thanks in advance!
Ranjit.It was a problem with type of export params
after correction it got solved
Maybe you are looking for
-
Is it possible to expand the area of the desktop?
Is it possible to expand the area of the desktop? What I mean is, in a way similar to how you can expand the viewing area of the finder. For example, If you set finder to arrange icons - by: none, then you can slide the icons out of the field of view
-
Cannot connect to camera when using gpu rendering
Hi, anyone know why I can't connect to the camera when I use gpu rendering. I can use the camera when I use direct. Thanks!
-
See above - I do not want to be the first one. W. Prindl
-
Dbms_xmlquery.getxml problem
SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM --------- ---------- --------- ---------- --------- ---------- ---------- ---------- --------- ------------ 7369 SMITH CLERK 7902 17-DEC-80 800 20 14 rows selected. SQL> select dbms_xmlque
-
How to plot modulus and/or phase of S21 parameter by using Network Analyzer?
Hi, I'm using Network Analyzer Rohde Schwarz ZVB 8 (untill 8GHz) and I have to do same manipulation on Modulus and Phase of S parameters. I control the Network Analyzer by PC and if I'm in front of the Network it is really easy to do operations by lo