久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Excel 錯誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲

Excel error HRESULT: 0x800A03EC while trying to get range with cell#39;s name(Excel 錯誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍)
本文介紹了Excel 錯誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在使用 Window Service 項目.必須按順序?qū)?shù)據(jù)寫入 Excel 文件中的工作表.

I am working with Window Service project. that have to write data to a sheet in Excel file in a sequence times.

但有時,只是有時,服務(wù)在嘗試使用單元格名稱獲取范圍時拋出異常Exception from HRESULT: 0x800A03EC".

But sometimes, just sometimes, the service throw out the exception "Exception from HRESULT: 0x800A03EC" while it's trying to get range with cell's name.

我已經(jīng)把打開excel表格的代碼放在這里了.

I have put the code of opening excel sheet, and getting cell here.

  • 操作系統(tǒng):window server 2003 Office:
  • Microsoft Office 2003 sp2

1:打開excel表格

1: Opening excel sheet

m_WorkBook = m_WorkBooks.Open(this.FilePath, 0, false, 5,
     "", "", true, Excels.XlPlatform.xlWindows, ";",
     true, false, 0, true, 0, 0);

2:讓單元格寫入

protected object m_MissingValue = System.Reflection.Missing.Value;
Range range = m_WorkSheet.get_Range(cell.CellName, m_MissingValue);
// error from this method, and cell name is string.

推薦答案

錯誤碼0x800A03EC(或-2146827284)表示NAME_NOT_FOUND;換句話說,你已經(jīng)要求了一些東西,而 Excel 找不到它.

The error code 0x800A03EC (or -2146827284) means NAME_NOT_FOUND; in other words, you've asked for something, and Excel can't find it.

這是一個通用代碼,它可以應(yīng)用于很多它找不到的東西,例如.當(dāng) PivotItem 未應(yīng)用過濾器時,使用當(dāng)時無效的屬性(如 PivotItem.SourceNameStandard)會拋出此錯誤.Worksheets["BLAHBLAH"] 在工作表不存在等情況下會拋出此錯誤.通常,您要求的是具有特定名稱且不存在的內(nèi)容.至于為什么,這需要你自己去挖掘.

This is a generic code, which can apply to lots of things it can't find e.g. using properties which aren't valid at that time like PivotItem.SourceNameStandard throws this when a PivotItem doesn't have a filter applied. Worksheets["BLAHBLAH"] throws this, when the sheet doesn't exist etc. In general, you are asking for something with a specific name and it doesn't exist. As for why, that will taking some digging on your part.

檢查您的工作表是否確實有您要求的范圍,或者 .CellName 肯定會返回您要求的范圍的名稱.

Check your sheet definitely does have the Range you are asking for, or that the .CellName is definitely giving back the name of the range you are asking for.

這篇關(guān)于Excel 錯誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個隨機(jī)元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機(jī)數(shù))
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個 IAwaitable 的類)
主站蜘蛛池模板: 亚洲欧美精品国产一级在线 | 一级片在线观看 | 在线亚州| 玖玖综合网 | 99精品久久久 | 亚洲天堂影院 | 欧洲精品在线观看 | 91精品国产91久久久久久吃药 | 日本不卡在线视频 | 欧美日韩在线观看一区二区三区 | 97视频人人澡人人爽 | 午夜影院| 亚洲精品欧洲 | 一区视频在线免费观看 | 毛片一区二区三区 | 亚洲精品一区二区三区中文字幕 | 自拍偷拍视频网 | 国产一区二区三区久久久久久久久 | 99re视频 | 91色综合| 欧美日韩国产高清视频 | 日韩欧美在线一区 | 亚洲精品久久久一区二区三区 | 一区二区三区视频在线免费观看 | 国产亚洲网站 | 亚洲免费精品一区 | 成人国产精品免费观看视频 | 天天宗合网 | 久久国产精品精品 | 国产精品视频导航 | 亚洲视频在线观看 | 亚洲天堂久久 | 成人免费观看男女羞羞视频 | 在线一级片 | 午夜久久久 | 久久综合久久综合久久综合 | 九一国产精品 | 免费av一区二区三区 | 精品一二三区视频 | 日韩成人免费视频 | 成年人在线观看 |