| |

VerySource

 Forgot password?
 Register
Search
View: 963|Reply: 4

Convert an Excel crosstab into a DBF file

[Copy link]

2

Threads

9

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-21 19:30:02
| Show all posts |Read mode
Ask for help
Crossing an Excel
Convert to DBF file
The specific EXCEL table format is
  Time period A B C ...
 10: 00-12: 00 10% 20% 30%
 12: 00-13: 00 25% 15% 20%
  .
  .
  .
  .
Now convert to this table
Time period content percentage
10: 00-12: 00 A 10%
Reply

Use magic Report

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-7-7 09:15:02
| Show all posts
First convert the excel table to dbf format, create a new table with the following structure, do a loop to take the values ​​from the above table and insert it into the new table
Reply

Use magic Report

2

Threads

9

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-7-8 13:00:01
| Show all posts
Can you give the code
Thank you
Reply

Use magic Report

0

Threads

32

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-7-12 17:30:01
| Show all posts
First build a DBF table, set to JC, this DBF table has the same structure as your EXcel table, then import EXCEL into your table, and then process it.

USE JC
APPEND FFOM EXCEL table name. xls type xl5
lcString1='Select time period'
lcString2=''
lnFieldSum=Fcount('Jc')
For I=2 To lnFieldSum
lcString2=lcString2+lcString1+",'"+Field(I)+"' As content,"+Field(I)+' As percentage From Jc'+Iif(I=lnFieldSum,'',' Union all')
EndFor
&lcString2
Reply

Use magic Report

2

Threads

9

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-7-16 13:00:01
| Show all posts
o Which of my EXCEL is not fixed, there may be many strong numbers
But I have already achieved the goal by other means
Thank you very much
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list