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

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

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

問(wèn)題描述

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

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

但有時(shí),只是有時(shí),服務(wù)在嘗試使用單元格名稱獲取范圍時(shí)拋出異常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)把打開(kāi)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:打開(kāi)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:讓單元格寫(xiě)入

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.

推薦答案

錯(cuò)誤碼0x800A03EC(或-2146827284)表示NAME_NOT_FOUND;換句話說(shuō),你已經(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.

這是一個(gè)通用代碼,它可以應(yīng)用于很多它找不到的東西,例如.當(dāng) PivotItem 未應(yīng)用過(guò)濾器時(shí),使用當(dāng)時(shí)無(wú)效的屬性(如 PivotItem.SourceNameStandard)會(huì)拋出此錯(cuò)誤.Worksheets["BLAHBLAH"] 在工作表不存在等情況下會(huì)拋出此錯(cuò)誤.通常,您要求的是具有特定名稱且不存在的內(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.

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

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 錯(cuò)誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫(kù)?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無(wú)需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
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)建一個(gè) IAwaitable 的類)
主站蜘蛛池模板: 免费一级黄色片 | wwwav在线| 亚洲九九夜夜 | 免费黄网站在线观看 | 日本久久一区二区 | 国产精品国产三级国产aⅴ浪潮 | 国产精品一品二品 | 国产欧美精品一区 | 午夜精品999 | www精品| 一级片免费在线观看 | 黄色一级网站 | 精品久久一区二区 | 欧美视频一区二区三区 | 国产a区 | 日日爽天天 | 成人毛片在线观看 | 91色交视频 | 一区二区三区在线免费 | 哦┅┅快┅┅用力啊┅aps | 在线观看视频国产 | 国产精品一二三四区 | 成人在线观看视频网站 | 日韩精品在线视频 | 久久精品亚洲 | 成人91看片| 亚洲一级特黄 | 国内精品一区二区三区 | 综合久久久久 | 成人高潮片免费网站 | 亚洲欧美另类图片 | 日韩色av| 国产一级大片 | 国产一区二区三区视频 | 在线观看的av网站 | 精品视频免费观看 | 国产小视频网站 | 少妇一级片 | 亚洲www | 亚洲综合色网 | 成人精品三级av在线看 |