投稿日 | : 2004/07/23(Fri) 14:30 |
投稿者 | : 魔界の仮面弁士 |
Eメール | : |
URL | : |
タイトル | : Re^4: DataGrid上でのエクセルファイル編集 |
>> MDBファイル等のデータベースへ取り込んでからADOでデータ編集されたほうが、何かと便利です。
> 確かにMDBファイルを扱った方が問題なく扱いやすいかと思います。
> 今のままでは制限事項等が問題となりそうですので、
結構制限がありますよ。仕様を確認してみたのですが、
・ワークシート(Excel 3.0, Excel 4.0)形式がサポートされている。
・ワークブック(Excel 5.0, Excel 7.0, Excel 8.0)形式もサポートされている。
・インデックスを作成できないので、データ量が多いとパフォーマンスが落ちる。
・パスワード付きファイルを開く事はできない。
・ワークシートやワークブックから、行を削除する事はできない。
・ワークシートの個々のセルからデータを消去する事はできるが、式を含めたセルの消去や変更はできない。
のような制限があります。
[Working with Microsoft Excel Worksheets and Workbooks]
| The Microsoft Excel product line includes the following
| single-sheet worksheet and multiple-sheet workbook versions
| supported by the Microsoft Jet IISAM driver for Microsoft Excel:
| Microsoft Excel 3.0 and 4.0 (single-sheet) and Microsoft Excel
| 5.0, 7.0, and 8.0 (multiple-sheet workbooks). There are a few
| operations that you cannot perform on Microsoft Excel worksheets
| or workbooks through the Microsoft Excel IISAM driver:
| * You cannot delete rows from Microsoft Excel worksheets or
| workbooks.
| * You can clear data from individual cells in a worksheet, but
| you cannot modify or clear cells that contain formulas.
| * You cannot create indexes on Microsoft Excel worksheets or
| workbooks.
| * You cannot read encrypted data through the Microsoft Excel
| IISAM driver. The PWD argument in the connection string cannot
| be used to open an encrypted worksheet or workbook, even if
| you supply the correct password. You must decrypt all
| Microsoft Excel worksheets or workbooks through the Microsoft
| Excel user interface if you plan to link or open them in your
| Microsoft Jet database.
それと、データ型の自動判定に失敗する事も考えて、TypeGuessRows も
設定しておいた方が良いでしょう。
http://www.users.gr.jp/ml/archive/viewer.aspx?name=Access&no=12119
個人的には、Excelファイルをデータベースとして開くのではなく、
VBからMicrosoft Excel をオートメーション操作する(もしくは、
最初からExcel VBAで組む)方が、トラブルが少ないかと思いますよ。