2011年12月31日 星期六

Nikon FT1

自從買了Nikon V1 之後,壓根沒想到我會買 FT1


因為 CX 的片幅讓所有的鏡頭 x 2.7


所以我大部分單眼的鏡頭上去可能並不實用


30mm * 2.7 = 81mm


18mm * 2.7 = 48.6mm


然而就在昨天臨時起意去 Nikon 旗艦店逛逛


剛開始只對兩個地方印象深刻


1. x 2.7 Nikon 70-300mm VR 變超望遠的


2. 接了轉接環之後,對焦很慢


.


內心還在天人交戰的時候


“這是這批進貨的最後一個囉”聽到店員說這句話就軟了… ><


.


開箱就不拍了,直接來一張


(老實說-有點重量)



.


2011年12月16日 星期五

使用 Excel 2007 (DCOM - Excel.Application) 產生 Excel 出現 記憶體或空間不足 的解決方法

一般由 Web 產生 Excel 的方法基本上大概有 3 種:


1. 使用 Server Side 的 DCOM ( Server需要安裝 Excel )


2. 使用 Client Side 的 DCOM ( Client需要安裝 Excel )


3. 使用 GridView render 成 HTML 並 Output 成 Excel 檔案


 


每一種都有一些優缺點以及限制,


這次遇到的問題是使用 (1) 的方法時所出現的問題。


Error Message 如下:



Microsoft Office Excel 錯誤 "800a03ec"



Microsoft Excel cannot open or save any more documents because there is not enough available memory or disk space.

• To make more memory available, close workbooks or programs you no longer need.

• To free disk space, delete files you no longer need from the disk you are saving to.


 


會錯在類似 SET objWorkBook = objExcelApp.ActiveWorkBook
或是 Set objWorkBook = objExcelApp.Workbooks.Add


 


解決方法為,加上下面那一段設定即可。


objExcelApp.DefaultSaveFormat = 56


(參考來源:Athrun-Excel 2007 (Excel.Application) Workbooks.Add 出现内存不够的解决办法@博客園


 


而關於 DefaultSaveFormat 的參數,看起來跟儲存的格式有關。


CodeFormat
50.xlsb
51.xlsx
52.xlsm
56.xls


(資料來源:Office DefaultSaveFormat check


 


使用 DCOM - 匯出 Excel 的權限設定方法可以參考這一篇:


ASP Config Excel (Excel.Application)


Permissions 分為 Launch and Activation, Access and Configuration


另外一篇參考資料


How do I properly setup permissions for Excel DCOM Objects when we have ‘Impersonate’ Set to ‘True’ in our Web.Config