excel 单元格与任意自定义内容拼接公式

例子:1,'liux117','刘星',new date(),'liux117','刘星',new date(),1,1,1,'IV20201028000003','liux117',发票类型,'91130100MA09NWM32B','石家庄万科文泽房地产开发有限公司','河北省石家庄市长安区高营大街30号恒大御景半岛2号公寓2028','0311-89880704','中国建设银行股份有限公司石家庄建华南大街支行','13050161580100001338','liux117','13833173386','', 0, ''


单元格公式:  =($P5 &1&"," &"'" &L5& "'," &  "'" &J5& "'," & "new date()" & ","&"'"&L5&"'," &"'"&J5&"',"  & "new date()" & ",1,1,1," &"'"&O5&"'," &"'"&L5&"',"  & "发票类型," &"'"&E5&"'," &"'"&D5&"'," &"'"&F5&"'," &"'"&I5&"'," &"'"&G5&"'," &"'"&H5&"'," &"'"&L5&"'," &"'"&K5&"'," & "'', 0, '')")

=("IV2020102800000"&N3)


公式1(前后带逗号):   ","&"'"&G5&"',"


公式2(前不带逗号后带逗号):  &"'"&G5&"',"

学会用了这种方式,可以用excel 完成各种字符串拼接,例如批量sql 生成,批量脚本等

你可能感兴趣的:(excel,sql)