الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Send Data From Oracle Form6i To Ms Excel

Featured Replies

بتاريخ:

 

hello

my friend

i have gift for you

today can you send data to excel

this is cod :


DECLARE
AppID PLS_INTEGER;
ConvID PLS_INTEGER;
RCount Number := 0;
CURSOR c1 IS SELECT sandid, sanddate, itemsname from sand;
PROCEDURE INSERTROW (invalue VARCHAR2, incol NUMBER) IS
BEGIN
DDE.POKE(ConvID, 'R'||TO_CHAR(RCount)||'C'||TO_CHAR(incol), invalue, DDE.CF_TEXT, 1000);
END INSERTROW;
BEGIN
--:WORKSHEETPATH is a field on the form that contains the path and name of the Excel worksheet
--:EXCELFILEPATH is a field on the form that contains the name of the Excel.exe ex. c:\program files\microsoft office\office\excel.exe
WIN_API_UTILITY.DELETE_FILE('D:\book.xls',False);
RCount := 1;
AppID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\Office12\excel.exe', DDE.APP_MODE_MAXIMIZED);
ConvID := DDE.INITIATE('EXCEL', 'system');
DDE.EXECUTE(ConvID, '[save.As("' || 'D:\book.xls' || '",1)]',10000);
ConvID := DDE.INITIATE('EXCEL', 'D:\book.xls');
--Insert row for headings
INSERTROW('Col1', 1);
INSERTROW('Col2', 2);
INSERTROW('Col3', 3);
FOR INV IN c1 LOOP
RCount := RCount + 1;
INSERTROW(NVL(TO_CHAR(INV.sanddate,'mm/dd/yyyy'),' '), 1); --inserting a date. if null, return a space
INSERTROW(NVL(TO_CHAR(INV.sandid),' '), 2); --if a numeric column, convert to text and if null, return a space
INSERTROW(NVL(INV.itemsname,' '), 3); --if text column, just check for null
END LOOP;
END;
EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('Could not start EXCEL (' || 'C:\Program Files\Microsoft Office\Office12\excel.exe' || ').');
WHEN DDE.DDE_INIT_FAILED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_SYS_ERROR THEN
MESSAGE('An internal error has occurred.');
WHEN OTHERS THEN
MESSAGE(TO_CHAR(MESSAGE_CODE) || ' ' || MESSAGE_TEXT || TO_CHAR(ERROR_CODE) || ' ' || ERROR_TEXT);

 

بتاريخ:
  • كاتب الموضوع

ارسال البيانات من اوراكل الي اكسل

hello

my friend

i have gift for you

today can you send data to excel

this is cod :

DECLARE
AppID PLS_INTEGER;
ConvID PLS_INTEGER;
RCount Number := 0;
CURSOR c1 IS SELECT sandid, sanddate, itemsname from sand;
PROCEDURE INSERTROW (invalue VARCHAR2, incol NUMBER) IS
BEGIN
DDE.POKE(ConvID, 'R'||TO_CHAR(RCount)||'C'||TO_CHAR(incol), invalue, DDE.CF_TEXT, 1000);
END INSERTROW;
BEGIN
--:WORKSHEETPATH is a field on the form that contains the path and name of the Excel worksheet
--:EXCELFILEPATH is a field on the form that contains the name of the Excel.exe ex. c:\program files\microsoft office\office\excel.exe
WIN_API_UTILITY.DELETE_FILE('D:\book.xls',False);
RCount := 1;
AppID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\Office12\excel.exe', DDE.APP_MODE_MAXIMIZED);
ConvID := DDE.INITIATE('EXCEL', 'system');
DDE.EXECUTE(ConvID, '[save.As("' || 'D:\book.xls' || '",1)]',10000);
ConvID := DDE.INITIATE('EXCEL', 'D:\book.xls');
--Insert row for headings
INSERTROW('Col1', 1);
INSERTROW('Col2', 2);
INSERTROW('Col3', 3);
FOR INV IN c1 LOOP
RCount := RCount + 1;
INSERTROW(NVL(TO_CHAR(INV.sanddate,'mm/dd/yyyy'),' '), 1); --inserting a date. if null, return a space
INSERTROW(NVL(TO_CHAR(INV.sandid),' '), 2); --if a numeric column, convert to text and if null, return a space
INSERTROW(NVL(INV.itemsname,' '), 3); --if text column, just check for null
END LOOP;
END;
EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('Could not start EXCEL (' || 'C:\Program Files\Microsoft Office\Office12\excel.exe' || ').');
WHEN DDE.DDE_INIT_FAILED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_SYS_ERROR THEN
MESSAGE('An internal error has occurred.');
WHEN OTHERS THEN
MESSAGE(TO_CHAR(MESSAGE_CODE) || ' ' || MESSAGE_TEXT || TO_CHAR(ERROR_CODE) || ' ' || ERROR_TEXT);
  • بعد 2 سنة...
بتاريخ:

شكرا 


EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('Could not start EXCEL (' || 'C:\Program Files\Microsoft Office\Office12\excel.exe' || ').');
WHEN DDE.DDE_INIT_FAILED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('Could not initialize conversation with ' || 'D:\book.xls' || '.');
WHEN DDE.DMLERR_SYS_ERROR THEN
MESSAGE('An internal error has occurred.');
WHEN OTHERS THEN
MESSAGE(TO_CHAR(MESSAGE_CODE) || ' ' || MESSAGE_TEXT || TO_CHAR(ERROR_CODE) || ' ' || ERROR_TEXT);

تم تعديل بواسطة Ahmed_oracle

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.