Font style
Hello
How can I see which fonts are used in a PDF file, or the fonts photoshop see
THX
Hi André,.
You can tell which fonts are used in a PDF document by choosing File > properties and then clicking on the tab fonts fonts used in the document are listed, with an indication to know if they are integrated or subset.
Best,
Sara
Tags: Adobe
Similar Questions
-
PROBLEM WITH DATE PICKER:
Hi, I want to use the date picker as it... and set to the current value of default.and use another text box to display the selected value... to datepicker.can someone give me the entire code? If I want to write the value selected, run time using a picture as a textbox, what should I do?... Please help me... its urgent...
OK, but I used the images for what little arrows... to prevmonth, nextmonth, prevyear and next.
Here's the code...
import net.rim.device.api.ui.container.PopupScreen; import net.rim.device.api.ui.container.VerticalFieldManager; import net.rim.device.api.ui.container.HorizontalFieldManager; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.Color; import net.rim.device.api.ui.Font; import net.rim.device.api.ui.Field; import net.rim.device.api.system.Display; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.system.Characters; import net.rim.device.api.system.Bitmap; import net.rim.device.api.util.DateTimeUtilities; import net.rim.device.api.i18n.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import com.LMS.CustomManagers.TableLayoutManager; /** * */ public class CalendarPopup extends PopupScreen implements FieldChangeListener { private boolean isClosed = false; private static SimpleDateFormat sdfWeekDay = new SimpleDateFormat("Ei"); private static SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM yyyy"); private Calendar _cl = Calendar.getInstance(); private Bitmap PrevYearFocus = Bitmap.getBitmapResource("cal_previous_year.png"); private Bitmap PrevMonthFocus = Bitmap.getBitmapResource("cal_previous_month.png"); private Bitmap NextMonthFocus = Bitmap.getBitmapResource("cal_next_month.png"); private Bitmap NextYearFocus = Bitmap.getBitmapResource("cal_next_year.png"); private Bitmap PrevYear = Bitmap.getBitmapResource("cal_previous_year_focus.png"); private Bitmap PrevMonth = Bitmap.getBitmapResource("cal_previous_month_focus.png"); private Bitmap NextMonth = Bitmap.getBitmapResource("cal_next_month_focus.png"); private Bitmap NextYear = Bitmap.getBitmapResource("cal_next_year_focus.png"); private static int [] tableStyles = new int [] { TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH, TableLayoutManager.FIXED_WIDTH }; private int [] tableSizes = new int [7]; private TableLayoutManager _monthManager; // This is where we display the Dates private static String FIELD_SIZE_STRING = " 30 "; private static String SINGLE_BLANK = " "; private int _currentFocusDay; private int _currentMonth; // This is the month as usually defined. // In Calendar, January is month 0. private int _currentYear; private String _currentMonthString = "MMM yyyy"; private Field _initialFocusField = null; private int _selectedDay = -1; // None selected private Font _normalFont; private Font _boldFont; private ClickbleImage PrevYearBut, PrevMonthBut, NextMonthBut, NextYearBut; private BorderedLabel MonthDisplay,Today; public CalendarPopup(Date selectedDate) { super(new VerticalFieldManager(){ public void sublayout(int width, int height) { super.sublayout(Display.getWidth(),height); } }); _cl.setTime(selectedDate); createScreen(_cl.get(Calendar.DAY_OF_MONTH), _cl.get(Calendar.MONTH) + 1, _cl.get(Calendar.YEAR)); } public boolean isClosed(){ return isClosed; } private void displayMonth() { _monthManager.deleteAll(); // Delete the stuff currently there // Determine start of the Month _cl.set(Calendar.DAY_OF_MONTH, 1); _cl.set(Calendar.MONTH, _currentMonth - 1); _cl.set(Calendar.YEAR, _currentYear); _cl.set(Calendar.HOUR_OF_DAY, 12); _cl.set(Calendar.MINUTE, 0); _cl.set(Calendar.SECOND, 0); _cl.set(Calendar.MILLISECOND, 1); long startOfMonth = _cl.getTime().getTime(); // set Month in 'header' _currentMonthString = sdfMonth.formatLocal(_cl.getTime().getTime()); // Figure out where the month display needs to start int workDay = _cl.get(Calendar.DAY_OF_WEEK); int startAt = 0; switch (workDay) { case(Calendar.MONDAY): { startAt = 0; break; } case(Calendar.TUESDAY): { startAt = -1; break; } case(Calendar.WEDNESDAY): { startAt = -2; break; } case(Calendar.THURSDAY): { startAt = -3; break; } case(Calendar.FRIDAY): { startAt = -4; break; } case(Calendar.SATURDAY): { startAt = -5; break; } case(Calendar.SUNDAY): { startAt = -6; break; } } Date workDate = _cl.getTime(); long workDateTime = workDate.getTime() + ((long)startAt) * ((long)DateTimeUtilities.ONEDAY); //long dayTime = workDateTime; for ( int i = 0; i < 42; i++ ) { // Need at most 6 rows workDate.setTime(workDateTime); _cl.setTime(workDate); workDateTime = workDateTime + DateTimeUtilities.ONEDAY; BorderedLabel blf = null; //int actualDate = _cl.get(Calendar.DAY_OF_MONTH); int actualDate = _cl.get(Calendar.DAY_OF_MONTH); String tempDateString = Integer.toString(actualDate); int textColor = Color.BLACK; if ( _cl.get(Calendar.MONTH) == _currentMonth - 1 ) { if ( _currentFocusDay == actualDate ) { _initialFocusField = blf; textColor = Color.RED; } blf = new BorderedLabel(tempDateString, LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER | LabelField.FOCUSABLE,textColor); } else if ( (i % 7 == 0) && (startOfMonth < _cl.getTime().getTime()) ) { // We have finished the month break; } else { blf = new BorderedLabel(tempDateString, LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER,Color.LIGHTGREY); } blf.setChangeListener(this); _monthManager.add(blf); } if ( this.isDisplayed() && _initialFocusField != null ) { _initialFocusField.setFocus(); _initialFocusField = null; } MonthDisplay.SetText(_currentMonthString); } private void createScreen(int focusDay, int startMonth, int startYear) { // Initial values for Screen _currentFocusDay = focusDay; _currentMonth = startMonth; _currentYear = startYear; final VerticalFieldManager topManager = new VerticalFieldManager(FIELD_HCENTER){ public void paint(Graphics g){ g.setColor(0x333333); g.fillRect(0,0,getWidth(),getHeight()); super.paint(g); } }; int columnSize = this.getFont().getAdvance(FIELD_SIZE_STRING); for ( int i = 0; i < tableSizes.length; i++ ) { tableSizes[i] = columnSize; } _monthManager = new TableLayoutManager(tableStyles, tableSizes, 0, TableLayoutManager.FIELD_HCENTER){ public void paint(Graphics g){ g.setColor(Color.WHITE); g.fillRect(0,0,getWidth(),getHeight()); super.paint(g); } }; VerticalFieldManager bottomManager = new VerticalFieldManager(FIELD_HCENTER){ public void paint(Graphics g){ g.setColor(0x333333); g.fillRect(0,0,getWidth(),getHeight()); super.paint(g); } protected void sublayout(int width, int height) { super.sublayout(width, height); setExtent(topManager.getWidth(), 30); } }; PrevYearBut = new ClickbleImage(PrevYearFocus,PrevYear,FIELD_HCENTER | FOCUSABLE); PrevYearBut.setChangeListener(this); PrevMonthBut = new ClickbleImage(PrevMonthFocus,PrevMonth,FIELD_HCENTER | FOCUSABLE); PrevMonthBut.setChangeListener(this); MonthDisplay = new BorderedLabel(_currentMonthString,NON_FOCUSABLE,Color.WHITE); MonthDisplay.setChangeListener(this); NextMonthBut = new ClickbleImage(NextMonthFocus,NextMonth,FIELD_HCENTER | FOCUSABLE); NextMonthBut.setChangeListener(this); NextYearBut = new ClickbleImage(NextYearFocus,NextYear,FIELD_HCENTER | FOCUSABLE); NextYearBut.setChangeListener(this); HorizontalFieldManager hfm = new HorizontalFieldManager(FIELD_HCENTER); hfm.add(PrevYearBut);hfm.add(new VerticalSpacer(5,3)); hfm.add(PrevMonthBut);hfm.add(new VerticalSpacer(5,3)); hfm.add(MonthDisplay);hfm.add(new VerticalSpacer(5,3)); hfm.add(NextMonthBut);hfm.add(new VerticalSpacer(5,3)); hfm.add(NextYearBut); topManager.add(hfm); TableLayoutManager _daysManager = new TableLayoutManager(tableStyles, tableSizes, 0,TableLayoutManager.FIELD_HCENTER); String [] days = {"Mo","Tu","We","Th","Fr","Sa","Su"}; for(int i = 0 ; i < days.length;i++){ _daysManager.add(new BorderedLabel(days[i],NON_FOCUSABLE | FIELD_HCENTER,Color.WHITE)); } topManager.add(_daysManager); displayMonth(); HorizontalFieldManager hfm1 = new HorizontalFieldManager(); Today = new BorderedLabel("Today",FOCUSABLE | FIELD_VCENTER,Color.WHITE); Today.setChangeListener(this); int space = Display.getWidth() >= 480 ? 130 : 90; hfm1.add(new VerticalSpacer(30,space));hfm1.add(Today);hfm1.add(new VerticalSpacer(30,space)); bottomManager.add(hfm1); this.add(topManager); this.add(_monthManager); this.add(bottomManager); } protected void onDisplay() { if ( _initialFocusField != null ) { _initialFocusField.setFocus(); _initialFocusField = null; } super.onDisplay(); } public void fieldChanged(Field field, int context){ _currentFocusDay = -1; // Leave focus on 'button' _initialFocusField = field; int monthIncrement = 33; if(field instanceof ClickbleImage){ if(field == PrevYearBut){ _currentYear = _cl.get(Calendar.YEAR)-1; displayMonth(); }else if(field == PrevMonthBut){ monthIncrement = -3; processMonth(monthIncrement); }else if(field == NextMonthBut){ processMonth(monthIncrement); }else if(field == NextYearBut){ _currentYear = _cl.get(Calendar.YEAR)+1; displayMonth(); } }else if(field instanceof BorderedLabel){ if(field == MonthDisplay){ }else if(field == Today){ _cl.setTime(new Date()); _currentFocusDay = _cl.get(Calendar.DAY_OF_MONTH); _currentMonth = _cl.get(Calendar.MONTH) + 1; _currentYear = _cl.get(Calendar.YEAR); displayMonth(); }else { LabelField lab = (LabelField) field; _selectedDay = Integer.parseInt(lab.getText()); close(); } } } private void processMonth(int monthIncrement){ _cl.set(Calendar.DAY_OF_MONTH, 1); _cl.set(Calendar.MONTH, _currentMonth-1); _cl.set(Calendar.YEAR, _currentYear); Date workDate = _cl.getTime(); workDate.setTime(workDate.getTime() + (((long)monthIncrement) * ((long)DateTimeUtilities.ONEDAY))); _cl.setTime(workDate); _currentMonth = _cl.get(Calendar.MONTH) + 1; _currentYear = _cl.get(Calendar.YEAR); displayMonth(); } public void close() { UiApplication.getUiApplication().popScreen(this); } public Date getSelectedDate() { if ( _selectedDay == -1 ) { return null; } Calendar cl = Calendar.getInstance(); cl.set(Calendar.YEAR, _currentYear); cl.set(Calendar.MONTH, _currentMonth - 1); cl.set(Calendar.DAY_OF_MONTH, _selectedDay); cl.set(Calendar.HOUR_OF_DAY, 0); cl.set(Calendar.MINUTE, 0); cl.set(Calendar.SECOND, 0); cl.set(Calendar.MILLISECOND, 1); return cl.getTime(); } public boolean keyChar(char key, int status, int time) { boolean retval = false; switch (key) { case Characters.ENTER: { // We have selected something break; } case Characters.ESCAPE: { close(); isClosed = true; retval = true; break; } default: break; } return retval; } } class ClickbleImage extends Field { private Bitmap bitmap1,bitmap2,img; private boolean isFocus = false; public ClickbleImage(Bitmap bitmap1,Bitmap bitmap2,long style) { super(style); this.bitmap1 = bitmap1; this.bitmap2 = bitmap2; img = bitmap1; } protected boolean navigationClick(int status, int time) { fieldChangeNotify(0); return true; } protected void onUnfocus() { isFocus = false; super.onUnfocus(); img = bitmap1; invalidate(); } protected void onFocus(int direction) { super.onFocus(direction); isFocus = true; img = bitmap2; invalidate(); } public void paint(Graphics g){ g.drawBitmap((this.getWidth()-img.getWidth())/2,(this.getHeight()-img.getHeight())/2,img.getWidth(),img.getHeight(),img,0,0); } protected void layout(int w, int h){ setExtent(20,20); } protected void drawFocus(Graphics graphics, boolean on) { } } class BorderedLabel extends LabelField { int width,height,color; private String text; private Font font; public BorderedLabel(String text, long style,int TextColor) { super(text, style); SetFont(Font.PLAIN,18); this.color = TextColor; this.text = text; } public void SetText(String text){ this.text = text; invalidate(); } public void paint(Graphics g) { width = this.getWidth(); height = this.getHeight(); if(isFocus()){ g.setColor(Color.YELLOW); g.fillRect(0,0,width,height); g.setColor(Color.BLACK); }else { g.setColor(color); } g.drawText(text, (getWidth() - font.getAdvance(text))/2, (getHeight() - font.getHeight())/2); } protected void onFocus(int direction) { super.onFocus(direction); invalidate(); } protected void onUnfocus() { super.onUnfocus(); invalidate(); } private void SetFont(int font_style, int font_size) { font = Font.getDefault().derive(font_style,font_size); this.setFont(font); } protected boolean navigationClick(int status, int time) { fieldChangeNotify(0); return true; } } class VerticalSpacer extends Field { // Only for VerticalFieldManagers private int _height; private int _width; public VerticalSpacer(int height, int width) { super(Field.NON_FOCUSABLE); _height = height; _width = width; } public void layout(int width, int hieght) { setExtent(_width, _height); } public void paint(Graphics g) { } }
I think you have the right to TableLayoutManager? If this isn't the case, then search the forum and you will get. Which I used here.
call this class-
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
You can use any format here (above)
CalendarPopup dd = new CalendarPopup (date)
UiApplication.getUiApplication () .pushModalScreen (dd);
{if (!) CDI IsClosed())}
Date selectedDate = dd.getSelectedDate ();
String DateStrValue = formatter.format (selectedDate) m:System.NET.SocketAddress.ToString ();
textbox.setText ((DateStrValue) formatter.format m:System.NET.SocketAddress.ToString ());
}TextBox is the lable field or anything like that
-
Specified police need to be changed in all the paragraph styles
Hi all
Y at - it an option to change a font that is used in many styles of paragraph to a few other fonts.
Thanks in advance,
Try this:
var myDoc=app.activeDocument; var pstyles = myDoc.allParagraphStyles; for (var a=1; a
explanations:
allParagraphsStyles Gets an array of all paragraph styles in the doc, whatever the group that might be in. myDoc.paragraphStyles.everyItem () Gets a collection of all the styles of paragraphs outside groups.
not run the table for 1 paragraph styles, 0, because the first is 'no style paragraph' and it is read-only. trying to change it will cause an error.
using a regular expression to match the name of the police because appliedFont.name returns a string like this: font_style font_name {tab} for example: 'Minion Pro\tSemibold subtitle.
It will be useful.
-
I have the procedure that get the value list to change font Style and of the font,
the problem whereby the property for this not character.
For example:
SET_ITEM_PROPERTY ('ITEM_NAME', FONT_STYLE, 'FONT_ITALIC'); = > is Wrong
SET_ITEM_PROPERTY ('ITEM_NAME', FONT_STYLE, FONT_ITALIC); = > is Correct
Help:
How I can declare property to get the value from the list and replace it with the specific property.
For example:
Declare
PROPERTY OF V_FONT_STYLE;
BEGIN
IF: LIST = "FONT_ITALIC" THEN
V_FONT_STYLE: = FONT_ITALIC;
END IF;
SET_ITEM_PROPERTY ('ITEM_NAME', FONT_STYLE, V_FONT_STYLE);
END;What do you see when you try the following:
message( 'FONT_ITALIC : ' || FONT_ITALIC );
I think that you will get a number, given that most of the properties is simply numbers. So what follows could work (not a not test it):
DECLARE V_FONT_STYLE NUMBER; BEGIN IF :LIST = 'FONT_ITALIC' THEN V_FONT_STYLE := FONT_ITALIC; END IF; SET_ITEM_PROPERTY('ITEM_NAME',FONT_STYLE,V_FONT_STYLE); END;
Concerning
Markus -
(webutil) How to save the file in a specific way?
Hello
I have this part of the code
who saves the excel C:\Export.xls file. I tried to open a file save dialog box, withArglist := OLE2.Create_Arglist; OLE2.Add_Arg(Arglist,'c:\Export.xls'); OLE2.Invoke(workbook, 'SaveAs', Arglist); OLE2.Destroy_Arglist(Arglist); -- release workbook OLE2.Release_Obj(workbook); OLE2.Release_Obj(workbooks); OLE2.Release_Obj(application);
PROCEDURE export_din_datablock (p_block varchar2) isBEGIN file_name_cl := CLIENT_GET_FILE_NAME('C:\Export', 'ExportExcel.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE); file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl)); -- IF file_name_cl IS NULL THEN MESSAGE('INSIDE EXCEPTION STATEMENT'); RAISE user_cancel; END IF; {code] But the file isn't saved. Why? So here is all the code
REQUEST OLE2. OBJ_TYPE;
WORKBOOKS OLE2. OBJ_TYPE;
WORKBOOK OLE2. OBJ_TYPE;
SPREADSHEETS OLE2. OBJ_TYPE;
WORKSHEET OLE2. OBJ_TYPE;
Arglist OLE2. LIST_TYPE;
CELL OLE2. OBJ_TYPE;
J INTEGER;
INTEGER K;
file_name_cl VARCHAR2 (32767).
USER_CANCEL EXCEPTION;
Workfont OLE2. OBJ_TYPE;
WorkInterior OLE2. OBJ_TYPE;
m_item varchar2 (40);
m_tot_columns number: = 0;
LC$ target Varchar2 (256): = "text.xls";
LC$ Fic Varchar2 (256);
-Inner Proc.
Procedure put_cell (number of no_lig,
Number of Col_num,
put_value varchar2,
FONT_NAME varchar2 default null,
font_size directory by default null,
font_style varchar2 default null, - we can use pune "BOLD" pentru "BOLD", "ITALIC" pentru italics, etc.
font_color directory by default null) is
Begin
Arglist: = OLE2.create_arglist;
OLE2.add_arg (arglist, row_num);
OLE2.add_arg (arglist, col_num);
cell: = OLE2.get_obj_property (Worksheet, 'Cells', Arglist);
OLE2.destroy_arglist (arglist);
OLE2.set_property (Cell, 'Value', put_value);
Workfont: = OLE2.get_obj_property (cell, 'Make');
WorkInterior: = OLE2.get_obj_property (cell, 'Interior');
If font_name is not null then
OLE2.set_property (Workfont, 'Name', FONT_NAME);
End if;
If font_size is not null then
OLE2.set_property (Workfont, 'Size', font_size);
End if;
If font_style is not null then
OLE2.set_property (Workfont, font_style, 1);
End if;
If font_color is not null then
OLE2.set_property (Workfont, font_color 'ColorIndex');
End if;
OLE2.release_obj (workfont);
OLE2.release_obj (workinterior);
OLE2.release_obj (cell);
End;
BEGIN
file_name_cl: = CLIENT_GET_FILE_NAME ('C:\Export', 'ExportExcel.xls', ' file XLS (.xls) | * .xls |', NULL, SAVE_FILE, TRUE);
file_name_cl: = SUBSTR (file_name_cl, 1, LENGTH (file_name_cl));
--
IF file_name_cl IS NULL THEN
MESSAGE ("INSIDE THE EXCEPTION STATEMENT");
RAISE user_cancel;
END IF;
APPLICATION: = OLE2. CREATE_OBJ ('Excel.Application');
OLE2. SET_PROPERTY (application, 'Visible', true);
WORKBOOKS: = OLE2. GET_OBJ_PROPERTY (APPLICATION, 'NOTEBOOKS');
WORKBOOK: = OLE2. INVOKE_OBJ (WORKBOOKS, "ADD");
WORKSHEETS: = OLE2. GET_OBJ_PROPERTY (WORKBOOK, 'WORKSHEETS');
WORKSHEET: = OLE2. INVOKE_OBJ (SPREADSHEETS, "ADD");
OLE2.set_property (spreadsheet, 'Name', 'leaf-ul meu');
GO_BLOCK (p_block);
PREMIER_ENREGISTREMENT;
-prima linie dedicated numelui sunt; pe linia incep 2.
J: = 2;
K: = 1;
LOOP
m_item: = get_block_property (p_block, first_item);
K: = 1;
Loop
exit in M_ITEM IS NULL;
If not id_null (find_item (p_block |'.)) ' || m_item)) then
-daca point-urile sunt type specificat (+ eventual alte conditii), atunci to export data din ele
If get_item_property (p_block |'.) ' || m_item, item_type) IN ('ELEMENT of TEXT', 'VIEW ARTICLES', 'LIST', 'CHECKBOX')
and get_item_property (p_block |'.) ' || m_item, visible) = "TRUE" then
If j = 2 then
-preiau dinamic name if sunt afisez pe linia 1, cu "BOLD"
put_cell (1, k, get_item_property (p_block |'.)) ' || m_item, column_name), null, null, 'FAT');
end if;
If not name_in (p_block |'.) ' || m_item) is NULL then
-data afisez
put_cell (j, k, name_in (p_block |'.)) ' || m_item));
End If;
K: = k + 1;
end if;
end if;
-merg urmatoarea inregistrare
m_item: = get_item_property (p_block |'.) ' || m_item, NEXTITEM);
END LOOP;
J: = J + 1;
When the output: system.last_record = "TRUE";
NEXT_RECORD;
END LOOP;
OLE2. Release_Obj (Worksheet);
OLE2. Release_Obj (Worksheets);
-Save the created Excel file
Arglist: = OLE2. Create_Arglist;
OLE2. Add_Arg (arglist, 'c:\export.xls');
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);
-Release of workbook
OLE2. Release_Obj (Workbook);
OLE2. Release_Obj (Workbooks);
OLE2. Release_Obj (application);
MESSAGE ("Export cu success!'");
END;Please help. Thanks
Roger
Not to be confused... YOU read my previous POST.
Also answer me...
How do you want to save the file?
1. replace or add to the file in the folder?
2. create a new file in the folder?If you answer is first, change your code in a more dynamic way
-Save the opened Excel file
rglist: = OLE2. Create_Arglist;
OLE2. Add_Arg (arglist, file_name_cl);
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);So then you can give it
-Save the created Excel file
rglist: = OLE2. Create_Arglist;
OLE2. Add_Arg(arglist,'c:\export\newexcelexport.xls');
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);
Your file will be saved in the "C:\export\" a folder with the name newexcelexport -
display the name of column in exported .xls
Hello
I found the following code which works perfectly to export data from forms in .xls.
But the cells are filled with data from the 1st line. In Excel, on the 1st line, with bold, I want the name of the columns. How can I do? If the recordings should start from the 2nd line.procedure ExportToExcel is APPLICATION OLE2.OBJ_TYPE; WORKBOOKS OLE2.OBJ_TYPE; WORKBOOK OLE2.OBJ_TYPE; WORKSHEETS OLE2.OBJ_TYPE; WORKSHEET OLE2.OBJ_TYPE; ARGS OLE2.LIST_TYPE; CELL OLE2.OBJ_TYPE; J INTEGER; K INTEGER; file_name_cl VARCHAR2(32767); user_cancel EXCEPTION; BEGIN file_name_cl := CLIENT_GET_FILE_NAME('C:\rep2excel', 'MyExport.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE); file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl)); -- IF file_name_cl IS NULL THEN MESSAGE('INSIDE EXCEPTION STATEMENT'); RAISE user_cancel; END IF; --MESSAGE('STARTING TRIGGER'); APPLICATION := OLE2.CREATE_OBJ('Excel.Application'); OLE2.SET_PROPERTY(APPLICATION,'Visible',True); WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS'); WORKBOOK := OLE2.INVOKE_OBJ(WORKBOOKS, 'ADD'); WORKSHEETS := OLE2.GET_OBJ_PROPERTY(WORKBOOK, 'WORKSHEETS'); WORKSHEET := OLE2.INVOKE_OBJ(WORKSHEETS, 'ADD'); GO_BLOCK('ELEVI'); FIRST_RECORD; J:=1; K:=1; WHILE :SYSTEM.LAST_RECORD = 'FALSE' LOOP FOR K IN 1..9 --form has 9 columns LOOP If not name_in(:system.cursor_item) is NULL Then args:=OLE2.create_arglist; OLE2.add_arg(args, j); OLE2.add_arg(args, k); cell:=OLE2.get_obj_property(worksheet, 'Cells', args); OLE2.destroy_arglist(args); OLE2.set_property(cell, 'Value', name_in(:system.cursor_item)); OLE2.release_obj(cell); End If; NEXT_ITEM; END LOOP; J:=J+1; NEXT_RECORD; END LOOP; -- for the last record for k in 1..9 loop If not name_in(:system.cursor_item) is NULL Then args:=OLE2.create_arglist; OLE2.add_arg(args, j); OLE2.add_arg(args, k); cell:=OLE2.get_obj_property(worksheet, 'Cells', args); OLE2.destroy_arglist(args); OLE2.set_property(cell, 'Value', name_in(:system.cursor_item)); OLE2.release_obj(cell); End If; next_item; end loop; OLE2.Release_Obj(worksheet); OLE2.Release_Obj(worksheets); -- Save the Excel file created args := OLE2.Create_Arglist; OLE2.Add_Arg(args,'c:\temp\test.xls'); OLE2.Invoke(workbook, 'SaveAs', args); OLE2.Destroy_Arglist(args); -- release workbook OLE2.Release_Obj(workbook); OLE2.Release_Obj(workbooks); OLE2.Release_Obj(application); MESSAGE('RIGHT BEFORE END'); END;
Any ideas?
Thank you!Rogerrrrrrrrrr...
because there was a pause stmt. in the code... as a stmt message... remove a friend!
you don't need this funtion now that you need display all visible items in the block...PROCEDURE l_call_Excel(p_block varchar2 ) is APPLICATION OLE2.OBJ_TYPE; WORKBOOKS OLE2.OBJ_TYPE; WORKBOOK OLE2.OBJ_TYPE; WORKSHEETS OLE2.OBJ_TYPE; WORKSHEET OLE2.OBJ_TYPE; Arglist OLE2.LIST_TYPE; CELL OLE2.OBJ_TYPE; J INTEGER; K INTEGER; file_name_cl VARCHAR2(32767); user_cancel EXCEPTION; Workfont OLE2.OBJ_TYPE; WorkInterior OLE2.OBJ_TYPE; m_item varchar2(40); m_tot_columns number := 0; --Inner Proc. Procedure put_cell (Row_num number, Col_num number, put_value varchar2, font_name varchar2 default null, font_size binary_integer default null, font_style varchar2 default null,/*here you can pass BOLD for bold, ITALIC for italic etc*/ font_color binary_integer default null) is Begin Arglist := OLE2.create_arglist; OLE2.add_arg(Arglist,row_num); OLE2.add_arg(Arglist,col_num); cell := OLE2.get_obj_property(Worksheet,'Cells',Arglist); OLE2.destroy_arglist(Arglist); OLE2.set_property(cell,'Value',put_value); Workfont := OLE2.get_obj_property(cell,'Font'); WorkInterior := OLE2.get_obj_property(cell,'Interior'); If font_name is not null then OLE2.set_property(Workfont,'Name',font_name); End if; If font_size is not null then OLE2.set_property(Workfont,'Size',font_size); End if; If font_style is not null then OLE2.set_property(Workfont,font_style,1); End if; If font_color is not null then OLE2.set_property(Workfont,'ColorIndex',font_color); End if; OLE2.release_obj(workfont); OLE2.release_obj(workinterior); OLE2.release_obj(cell); End; BEGIN file_name_cl := CLIENT_GET_FILE_NAME('C:\rep2excel', 'MyExport.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE); file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl)); -- IF file_name_cl IS NULL THEN MESSAGE('INSIDE EXCEPTION STATEMENT'); RAISE user_cancel; END IF; --MESSAGE('STARTING TRIGGER'); APPLICATION := OLE2.CREATE_OBJ('Excel.Application'); OLE2.SET_PROPERTY(APPLICATION,'Visible',True); WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS'); WORKBOOK := OLE2.INVOKE_OBJ(WORKBOOKS, 'ADD'); WORKSHEETS := OLE2.GET_OBJ_PROPERTY(WORKBOOK, 'WORKSHEETS'); WORKSHEET := OLE2.INVOKE_OBJ(WORKSHEETS, 'ADD'); OLE2.set_property(Worksheet,'Name','this is my sheet, named by me'); GO_BLOCK(p_block); FIRST_RECORD; /*as your data should print from second row*/ J:=2; K:=1; LOOP m_item := get_block_property(p_block,first_item); K:=1; Loop exit when M_ITEM IS NULL ; If not id_null(find_item(p_block||'.'||m_item)) then If get_item_property(p_block||'.'||m_item,item_type)IN ( 'TEXT ITEM' ,'DISPLAY ITEM','LIST','CHECKBOX') and get_item_property(p_block||'.'||m_item,visible) ='TRUE' then If j=2 then put_cell(1,k,get_item_property(p_block||'.'||m_item,column_name)); end if; If not name_in(p_block||'.'||m_item) is NULL Then put_cell(j,k,name_in(p_block||'.'||m_item)); End If; K:=k+1; end if; end if; m_item := get_item_property(p_block||'.'||m_item,NEXTITEM ); END LOOP; J:=J+1; exit when :system.last_record = 'TRUE'; NEXT_RECORD; END LOOP; OLE2.Release_Obj(worksheet); OLE2.Release_Obj(worksheets); -- Save the Excel file created Arglist := OLE2.Create_Arglist; OLE2.Add_Arg(Arglist,'c:\temp\test.xls'); OLE2.Invoke(workbook, 'SaveAs', Arglist); OLE2.Destroy_Arglist(Arglist); -- release workbook OLE2.Release_Obj(workbook); OLE2.Release_Obj(workbooks); OLE2.Release_Obj(application); MESSAGE('RIGHT BEFORE END'); END;
-
Why the FONT to SET_CANVAS_PROPERTY integrated settings does not work with me?
After I had a glance for integrated references SET_CANVAS_PROPERTY: -.
http://www.Oracle.com/webapps/online-help/forms/10G/topics/f1_help/builts/setcspro.html?TP=true
I made a push button to the canvas content and reporting to the same code on this subject, which does not any change to any text in the drawing area: -.
SET_CANVAS_PROPERTY ('FONT_CANVAS', FONT_NAME, "Comic without MS");
NEITHER
SET_CANVAS_PROPERTY('FONT_CANVAS',FONT_SIZE,40);
EACH of them: -.
FONT_NAME, FONT_SIZE, FONT_WEIGHT, FONT_STYLE AND FONT_SPACING
does not not with me... I was wondering... why?
--------------
I use DB 10 g 2, Version developer Forms 32 Bit 10.1.2.0.2 (Production)
and Windows XP SP2 64-bitFONT attributes to a canvas are for the 'Security tab' when you use Tab-paintings. They have nothing to do with mat-text placed on the canvas.
Maybe you are looking for
-
CarPlay does not work after iOS10
Hello everyone. Until yesterday, I was using carplay with no issues whatsoever with my iPhone on my Peugeot 208 2016 5s. However, today, since the upgrade to iOS10, I simply can't use it. My iPhone displays the following message: "This accessory is n
-
Enter computer hp mini 110 the current password
Hello.İ have current enter password problem. My hp mini 110 111ost pc. Please help me. Thank you.
-
programming LabVIEW 2010 how to scxi 1102 and 1503 cascade in scxi 1101 case
How to scxi 1102 and 1503 cascading if 1101 scxi for labview 2010 programming
-
LabVIEW, arduino y blueto
Buenas, Estoy intentando realize Comunicación con labview bluethoot y arduino, uso UN programa that works cuando esta mediante el USB conectado,. ago di alta el arduino in the computadora me da 2 puertos com In el Vi.ini the pongo q h. con bluemirf a
-
my computer is very slow, like vius I don't no what to do I need help?
my computer also freezes a lot, messeages poping up to his confusion he takes alongtime at startup please help me!