Skip to main content

Posts

Showing posts from June, 2007

been 3 weeks in NEC

well, i'm not aware that i've been more than 3 weeks now working in our client NEC Indonesia. first i gonna tell u that making an Add-On in SBO is not hard as i imagine before..they got all sample that need to be used in SDK..just installed the SDK component that u can move forward.. also u need some more experience than u to ask for why this working, why u need this, etc..so u can move more fast :D IMHO SAP SDK is not flexible enough and the error documentation is not great enough coz i some time need to search from internet for the error..most of it just take a guess by looking at the source code ;( but most of all, they put up great effort coz making it possible modifying SBO using other code like C#, VB 6, VB.NET, etc.. gonna continue my exploration ;) see u

some code to Read excel file..

took me some time to search for it eventhough i already found a few months ago ;( -- Read from Excel file SELECT * FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=PATH_TO_EXCEL_FILE_HERE;IMEX=1;HDR=Yes;', 'SELECT * FROM [SHEET_NAME_HERE$]') Or SELECT * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0', 'Data Source="C:\TemplateImportBudget.xls";Extended properties=Excel 8.0;')...Expenses$ PS: when try this query, make sure no application open the excel file otherwise u'll get an error u need to enable Ad Hoc Distributed Queries configuration see this link see u

MSSQL Code

took me some time to search for it eventhough i already found a few months ago ;( first is to read from excel file..i tried this using Query Analyzer -- Read from Excel file SELECT * FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=PATH_TO_EXCEL_FILE_HERE;IMEX=1;HDR=Yes;', 'SELECT * FROM [SHEET_NAME_HERE$]') Or SELECT * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0', 'Data Source="PATH_TO_EXCEL_FILE_HERE";Extended properties=Excel 8.0;')...SHEET_NAME_HERE$ PS: [FROM MS] IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then setting IMEX=1 will not convert the default da...