Excel / Magento。 CSV

我有一个很大的问题。 我非常强调要获得一个Magento网站,它通过csv处理import的方式是心灵弯曲!

我基本上没有VBA培训,但我认为这可以帮助我完成这个任务。 问题是与多领域csv。 我有一个名为大小的列标题。 在下面我需要固定值7列:38,39,40,…,44我目前的csv使用单行。 所以我需要多行,只是大小列中的单元格完成与这些值。 例如:

HEADER1 HEADER2 HEADER3 SIZE HEADER 4 Value Value Value 38,39, etc Value Value2 Value2 Value2 38,39, etc Value2 I Need This: HEADER1 HEADER2 HEADER3 SIZE HEADER 4 Value Value Value 38 Value 39 40 41 Value2 Value2 Value2 38 Value2 39 40 41 

我find了一个脚本

 Sub InsertARow() 'make new row ActiveCell.EntireRow.Insert Shift:=xlDown 'copy the row above ActiveCell.Offset(-1, 0).EntireRow.Copy Cells(ActiveCell.Row, 1) On Error Resume Next 'clear every cell in the new line that does not have a formula ActiveCell.EntireRow.SpecialCells(xlCellTypeConstants, 23).ClearContents End Sub 

这会在当前选区上方插入X行。 有没有办法为所有的细胞做select? 自动完成将处理其余的。 我在想这样的事情

 for i:=1 to n do j:=i+7(the number of sizes i need to display) -> insert the above code for that cell. 

而实际的完成是由Excel处理的。

你在以下问题上基本上有同样的问题,所以你可能想把我的解决scheme应用到你的情况 – 这样做不应该很难。

如何用Excel分割单元格中的行

Excel / VBA细分字段