尝试使用oldeb更新Excel工作表 [英] Trying to update a excel worksheet using oldeb

查看:95
本文介绍了尝试使用oldeb更新Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB.Net 2005和Excel 2000(是的,我们正在更新此项目:-)).无论如何,我已经设法从Excel工作簿中获取所需的数据集,现在我不知道如何使用Oldeb更新工作簿.由于没有主键,您无法(或至少我无法)获得UPDATE才能工作. excel电子表格中的数据如下所示:

库存 百事可乐 饮食百事可乐 山.露水 橙色 C/F饮食百事可乐
单价 $ 0.34 $0.34$0.32$0.35$0.34
销售价格 $ 0.75 $ 0.75 $ 0.75 $ 0.75 $ 0.50
BaseQty 28 13 8 18 27

这应该使您对我正在查看的内容有所了解(库存为A1).左栏(A)是给经理一些关于其余各栏含义的想法.第一行最后是DataSet的标题行(我修剪掉了DataSet中的第一个col,但我可以轻松地将其放回去).
因此,在这种情况下,我想弄清楚的是如何更新BaseQty行.可以说,我想使百事可乐= 30,橙色= 24,其余的将相同.一旦我弄清楚了,我应该就能完成我要完成的其余工作.是的,我知道,如果我不使用Excel(这不是我的选择,并且大约8年没有使用Excel之类的东西),这样做会容易得多,但我坚持使用它. br/> 提前谢谢!
格式化为表格的文本[/编辑]

I''m using VB.Net 2005 and Excel 2000 (yes we are up to date with this project :-) ). Anyway, I have managed to get what I need into a DataSet from my Excel workbook and now I can''t figure out how to update the workbook using Oldeb. You can''t (or at least I can''t) get a UPDATE to work as there is no primary key. The data in the excel spreadsheet looks something like this:

InventoryPepsiDiet PepsiMt. DewOrangeC/F Diet Pepsi
UnitPrice$0.34$0.34$0.32$0.35$0.34
Sales Price$0.75$0.75$0.75$0.75$0.50
BaseQty281381827

That should give you some kind of idea of what I''m looking at (Inventory is A1). The left col (A) is to give the manager some kind of idea as to what the rest of the columns mean. The top row ends up being the header row for the DataSet (I trimmed off the first col in the DataSet, but I could easily put it back).
So what I''d like to figure out in this instance is how would I update the BaseQty row. Lets say I want to make Pepsi = 30 and Orange = 24 the rest will be the same. Once I figure that out I should be able to do the rest of what I''m trying to get done. And yes I know this would be so much easier if I wasn''t using Excel (not my choice, and I haven''t used Excel for anything like this in about 8 years) but I''m stuck with it.
Thanks in advance!
Formated text as table[/Edit]

推荐答案

0.34
0.34


0.34
0.34


0.32
0.32


这篇关于尝试使用oldeb更新Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆