Tag: 映射

无法在映射驱动器上find新文件夹

我创build了一个自动将当前工作簿上传到共享点的macros,从而触发macros。 macros成功,将file upload到映射到驱动器的共享点文件夹。 但是,如果SharePoint文件夹是以前创build的方式,macros只能成功。 例如。 也许1天先进。 如果该文件夹是新创build的,它将无法上传到该文件夹​​作为Sorry there's no such folder 。 如果我去窗口资源pipe理器上的驱动器,我将能够看到新创build的文件夹。 我也尝试复制信息框中显示的文件path,并键入窗口资源pipe理器,它指示我没有问题的文件夹。 有没有一种方法可以加快这个过程,为什么会发生这种情况? macrosIF语句 If Dir(spPath) = "" Then MsgBox "Sorry there's no such folder. Folder Path: " & vbNewLine & vbNewLine & spPath & "" Call UnMapDrive(drive) Exit Sub ElseIf Not Dir(spPath & fileName) = "" Then MsgBox("File Already Exist!!!") ElseIf Dir(spPath […]

excel vba词典vlookup

我的代码需要超过一个小时才能完成3500行,但我需要为超过40000行数据工作。 我正在寻找替代我的代码,通过使用字典,在感兴趣的上下文中提高性能。 任何人都可以帮我吗? Sub StripRow2Node() 'Read the Strip Design table With Sheets("Design-Moment") Sheets("Design-Moment").Activate LastR1 = .Range("B" & Cells.Rows.Count).End(xlUp).Row DM_arr = .Range(Cells(1, 1), Cells(LastR1, 7)) 'Col 1 to Col 7 DM_count = UBound(DM_arr, 1) End With 'Read the x and y coordinations and thickness of a node in node design With Sheets("Design-Shear") Sheets("Design-Shear").Activate LastR2 = .Range("B" […]

Microsoft XP Windows – 映射应用程序以匹配访问数据 – “Mappoint”

有谁知道在哪里可以find一个好的地图工具来使用Access数据? 与Mappoint相似,但是没有详细/深入。 任何可以与Access或Excel工作的东西都是我真正需要的。 谢谢!

分割Excel单元格数据

我有这样的数据: 0, no, Male 1, no, Female 9, yes, Missing 在excel的单个单元格中。 问题是将其转换为如下所示: 0 | no | male 1 | no | female 9 | yes | missing 标题code | missing | description下的三个单元格中的每个值 code | missing | description 文本行转换没有帮助,我不能手动做,因为我们有大量的行。 如何进行?

为列名获取“不是有效的列名”我不提及,为什么?

我正在尝试开始使用LINQ to Excel,并将列映射到对象属性,但是我有一个非常奇怪的运行时错误,并且无法解决导致它的问题。 错误状态: LinqToExcel.dll中发生未处理的types“System.Data.DataException”exception 'oDateTime(-1.EDI_date')不是有效的列名 ,有效的列名是:'EDI Date','Week No','Dist No#','Cust Type','Cust No#','Site No #“,”date“,”时间“,”卡号#“,”注册“,”仓单“,”里程“, 这是奇怪的,因为我永远不会引用任何列的名称“oDateTime(-1.EDI_date”似乎Convert.ToDateTime函数被parsing为一个string或东西? 下面的块是执行LINQ查询的函数: public IEnumerable<EDI> getEDIs() { // Set date of last monday DateTime lastMonday = DateTime.Now.AddDays(-(int)DateTime.Now.DayOfWeek – 6); // Initialise Excel file var excelFile = new ExcelQueryFactory(DIRECTORY); // Create column mappings excelFile.AddMapping<EDI>(x => x.EDI_date, "EDI Date"); excelFile.AddMapping<EDI>(x => x.Week_no, "Week No"); […]

Excel VBA如何获得数字输出到Excel行的组合?

我需要find一种方法来输出数字的所有组合的结果(最好,如果可能在一行) 我有8个数字{1,2,3,4,5,6,7,8}组合的典型输出是i; j(i,j是来自集合的数字,而我是<j)。 生成结果很简单: Dim Myarray_2 As String Dim sht as Worksheet set sht = Sheet1 Myarray_2 = "" ' pick up 2 out of 8 For j = 2 To 8 For i = 1 To j – 1 sht.Cells(i + 1, j + 1) = Str(MyArray(i)) + ";" + Str(MyArray(j)) Myarray_2 = Myarray_2 […]

从一张纸到另一张纸的映射填充未填充的字符

所以我有一个Excel文件,部分填充字符数组(“|”显示excel列行): 当前结果(“_”是空格): 1111GGH80100022190 1112QQH80100023201 1113GGH80100045201 1114AAH80100025190 所以我现在的代码输出这个结果。 问题是字符1-5和21-24被跳过。 一般来说,如果没有列号占我应该打印“”(空间)。 期望的结果(“_”是空格): _____1111GGH80100022____190 _____1112QQH80100023____201 _____1113GGH80100045____201 _____1114AAH80100025____190 是否有列的方式来检测,如果我缺less标题列中的范围? 我目前使用这个,只select数据: Private Sub WriteFile_Click() Dim myFile As String, rng As Range, cellValue As Variant, I As Integer, j As Integer myFile = "C:\Reformatted.txt" Set rng = Selection Open myFile For Output As #1 For I = 1 To rng.Rows.Count For […]

如何在Spring映射中将列表的某些值设置为可选?

我想将以下列表中的某些值设置为可选,下面的映射将从Excel工作表中读取列并将其存储到数据库中。 但有些列可能不会在Excel表单中每次都出现,所以我想让一些列将remark12和remarks13为可选: <property name="remarkColumns"> <list> <value>remarks1</value> <value>remarks2</value> <value>remarks3</value> <value>remarks4</value> <value>remarks5</value> <value>remarks6</value> </list> </property> 请帮助解决scheme。

XML到Excel映射

我尝试使用XML将一些数据导出到Excel。 这里是我的代码生成Excel文件的一个例子: Private Sub ExportToExcel() Dim fs As New IO.StreamWriter("exported.xls", False) fs.WriteLine("<?xml version=""1.0""?>") fs.WriteLine("<?mso-application progid=""Excel.Sheet""?>") fs.WriteLine("<Workbook xmlns:ss=""urn:schemas-microsoft-com: Office:spreadsheet"">") ' Create the styles for the worksheet fs.WriteLine(" <Styles>") ' Style for the column headers fs.WriteLine(" <Style ss:ID=""1"">") fs.WriteLine(" <Font ss:Bold=""1""/>") fs.WriteLine(" <Alignment ss:Horizontal=""Center"" ss:Vertical=""Center"" " & _ "ss:WrapText=""1""/>") fs.WriteLine(" <Interior ss:Color=""#C0C0C0"" ss:Pattern=""Solid""/>") fs.WriteLine(" </Style>") ' Style […]